September 2011
1 post
Rvm & Daemontools
Any rvm prior to 1.8.3 can’t be used in the “rvm exec” form inside daemontools. The problem is that rvm leaves a bash wrapper around the ruby process, where daemontools requires that its managed processes exec away any wrappers. You know you have this problem when svc -dk doesn’t actually kill your ruby process (but does kill the wrapper), causing daemontools to...
Sep 13th
May 2011
1 post
Explicit ordering in mysql
A client application receives record ids in a particular, and meaningful order. We need to fetch blobs out of MySQL in that same order using an IN clause. Problem is, order is not guaranteed, unless ORDER BY  is present, and our MySQL has no idea how the original order was concocted. Previously, the code selected out the target data, and re-ordered the resultset in memory. This is very, very...
May 9th
March 2011
1 post
Hand-rolling KCachegrind on Centos 5.5
KCachegrind is  a tool for generating and viewing call-graphs for profiling code. Unfortunately, i’ts not laying around in any package repositories I have configured (I’ll write a heated screed on packaging systems at some point), so I decided to compile it myself. After much googling and random package installing (X, libx-devel, kdelibs-devel etc) and the like, i hit on the...
Mar 14th
January 2011
1 post
3 tags
Configuring splunkweb behind an ssl enabled...
Splunk is an awesome tool.  Getting the web frontend (aka Splunkweb) working behind a reverse proxy with ssl enabled is not awesome, and nearly totally undocumented. Here’s how I did it with Lighttpd (ymmv): Edit $splunk_home/etc/system/local/web.conf, and add the following directives: SSOMode = permissive tools.proxy.on = True tools.proxy.base = https://<your splunk hostname> ...
Jan 15th
19 notes
March 2010
1 post
2 tags
Inspect Mercurial Bundles
The Mercurial DSCCM system has the ability to create, read and apply “bundles”. Bundles are files containing compressed Mercurial changesets (including any binary content). Bundles are useful for transferring changesets between disconnected, or intermittently connected repositories. Often, it’s a good idea to inspect the bundle contents before unbundling. Mercurial treats a...
Mar 9th
8 notes
February 2010
2 posts
3 tags
Convert OSX DMG files to dd/img files
osx .dmg files can be easily converted to raw disk dumps (for use with the venerable dd) thusly:     hdiutil convert -format UDTO -o new.dd original.dmg Then you can ‘burn’ the image onto a thumbdrive or the like:     dd if=./new.dd of=/dev/disk2 bs=2m Note that if you get the output file parameter wrong, you run the risk of overwriting something you might not want to, like...
Feb 11th
4 notes
1 tag
Mount .iso images in osx
For some reason, osx doesn’t magically mount .iso images (i.e. dvd or cdrom backups). Fortunately, you can use the following: /usr/libexec/vndevice attach /dev/vn0 image.iso && mount_cd9660 /dev/vn0 /your/mountpoint You will find the contents of the iso image in /your/mountpoint
Feb 10th