Go at Google
0 notes

npm2rpm

npm2rpm creates an rpm for npm packages.

4 notes

A hubot nagios script

This hubot script takes alerts from nagios via http and formats them nicely for IRC.

2 notes

Speedup Firefox with VACUUM

I’ve seen a few posts about VACUUMing Firefox’s sqlite database for better performance, but each requires Firefox to be shut down. Here is a way to VACUUM your places database from within the browser.
  1. Go to Tools -> Error Console
  2. Paste the following in the “Code:” text-box:
    Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
  3. Press Enter
Your UI will freeze for a bit while the vacuum runs. Resources:
0 notes

Command line pastebin

I have been frustrated with copying/pasting command line output to pastebin lately.  To solve the problem I’ve whipped up a simple script to pastebin stdin. Check it out.

0 notes

Custom-User-CSS - Wordpress Plugin

I hacked up a new wordpress plugin that gives users more control over the appearance of their blogs.  This plugin is especially useful for WordpressMU maintainers and users.  Read more about it or visit its wordpress.org home.

0 notes

Simple bash locking

I often need to create lock files in my scripts, so crontab doesn’t spawn more than one process.  This is a simple bash lock file function I like to use:
function create_lock {
        LOCK_NAME=$1
        if [[ -e "$LOCK_NAME" ]]
        then
                OLDPID=`cat $LOCK_NAME`
                if ps p $OLDPID > /dev/null
                then
                        return 1
                fi
                rm $LOCK_NAME
        fi
        echo $$ > $LOCK_NAME
        return 0
}
create_lock doesn’t handle race conditions, but it is typically good enough for me.
0 notes

Mediawiki Google Search Appliance Integration

I was given the task of integrating our old Google Search Appliance with our internal wiki.    It turns out MediaWiki offers a couple of different ways to alter search functionality: $wgSearchForwardUrl and $wgSearchType.  The $wgSearchType variable accepts a SearchEngine class name and enables custom search back-ends.  SimpleXML and the GSA XML API then allowed me to fetch and process the search results.  After a few hours of tweaking I am pretty happy with the result, a tightly integrated full text search.

If you are interested in setting up your Google Search Appliance with a mediawiki instance, installation is simple, download or checkout the extension and follow the installation instructions.

0 notes

My Life is a Little Bit Easier Now

Lately, I’ve found the process of assigning a bug to myself slightly cumbersome and wanted to speed up the process.  I happen to be a fan of Ubiquity, so I decided to write a command.

The command assigntome, by default, changes the assigned to field to your user.  The whole process can be automated by tacking on the submit noun, which will simulate clicking the “Commit” button.

To install assigntome subscribe to my Ubiquity feed.

0 notes