Entries tagged as geek stuff
- November, 2008
-
debugging malloc
Have you read the
man malloc
page recently? Did you notice this section thereRecent versions of Linux libc (later than 5.4.23) and GNU libc (2.x) include a malloc implementation which is tunable via environment variables. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). Not all such errors can be protected against, however, and memory leaks can result. If MALLOC_CHECK_ is set to 0, any detected heap corruption is silently ignored; if set to 1, a diagnostic is printed on stderr; if set to 2, abort() is called immediately. This can be useful because otherwise a crash may happen much later, and the true cause for the problem is then very hard to track down.
So, you can do
export MALLOC_CHECK_=1
and malloc will print debugging messages to the stderr.Defined tags for this entry: geek stuff, programming -
emacs tip
If you want to check what compile options were used to build the emacs, check the value of the variable
system-configuration-options
in emacs. i.e.C-h-v system-configuration-options
In my case, it is `—with-x-toolkit=gtk' '—with-xft=yes' '—prefix=/home/rshekhar/fakeroot/'`
Defined tags for this entry: geek stuff -
good joomla template
Check out SpaceGlow joomla template by Bernard Esterhuyse. It is nice, however, more importantly, it is GPL-ed. I have been checking put a lot of joomla templates for my site, but all the joomla templates that I came across shared an important defect. Even though the template authors mentioned that the template was GPL-ed, they usually had a link to their own sites in the template, along with the request (or order), not to remove that line.
The Spaceglow template is really GPL-ed. This will allow me to hack it up further.
Defined tags for this entry: geek stuff, link - October, 2008
-
Replication
Check the slides at scribd, Getting Smart about the New World of PostgreSQL Replication. The first few slides are not specific to PostgreSQL and they define some common replication jargon very nicely.
Defined tags for this entry: geek stuff, mysql -
lunatech-journal.el
I have created a emacs major mode, called lunatech-journal, that I use for blogging. It is a derived mode from muse-mode, an excellent mode for writing and publishing.
Currently, it has following functions defined
lunatech-journal-skeleton
- loads a skeleton for blogginglunatech-journal-show-hints
- shows a buffer with questions to help me blog about my daylunatech-journal-make-html
- creates a html file from the muse-modelunatech-journal-preview
- allows me to preview my journal in the browser
I use a php script to post the blog entry to the website. To use it, I have the following in my .emacs file
(defun journal () (interactive) (find-file "~/blog/journal.muse") ) (require 'lunatech-journal) (add-to-list 'auto-mode-alist '("journal\\.muse\\'" . lunatech-journal-mode))
When I feel the need to blog, I do
M-x journal
, I get dropped into my journal file and I can blog.Links:
- lunatech-journal.el - the blogging mode
- Playing with your blog's xml-rpc interface shows the php script that I use to post entries to my blog
- MuseMode
Defined tags for this entry: geek stuff, programming - September, 2008
-
Trivia Time
An interesting bit of trivia. Ever wonder why the audio capacity of a standard compact disk is 74 minutes? Thank Beethoven - and Norio Ohga.
In the early 1980's, Sony was helping to develop a new digital music technology. Mr. Ohga, then the company's president, insisted that no matter what else, the new format had to be able to play Beethoven's Ninth Symphony without interruption. Mr. Ohga, you see, had been a classical vocalist before getting into electronics.
(Originally posted on my old blog on Fri, 31 Oct 2003)
Defined tags for this entry: geek stuff -
correlation
Seen in one of our internal mailing list
> Hypothesis: There's a correlation between not sucking at one's job and being
professional, observant, considerate and honest.
Disproved: http://en.wikipedia.org/wiki/Hans_Reiser
Defined tags for this entry: geek stuff, humour
Page 4 of 15, totaling 99 entries