Index (Site Map)
Click on the arrow icon beside each category to display or hide all items within the chosen category. Summaries of each page may be hidden or shown by clicking the plus icon next each item. Use the Options menu to expand or contract all items, display or hide summaries or sort the table of contents.
- Blog Posts
- Postgres timezone handling
March 28, 2013, 23:23
If you use the timestamptz data type, Postgres does timezone conversions automatically. First, some test data: pg=> create table time_test (id text,…
- Cannot see cursor in vi-mode with oh-my-zsh on Ubuntu
March 25, 2013, 22:57
I'm not sure who is to blame here, but using vi-mode in oh-my-zsh in Gnome Terminal on Ubuntu, I find that when I move from word to word, the cursor vanishes…
- Avoiding SSH host key verification failures
November 30, 2012, 20:55
While working on a deployment process that automatically updated an ElasticIP to point to a new instance, I got to see a lot of these: Offending key in…
- Thunderbird mailboxes growing without bounds
October 25, 2012, 18:15
The other day I got a low disk space warning because my Thunderbird Inbox had grown to over 100 GB. It turned out my Inbox, Trash, and Sent mailbox folders…
- Upload .m3u playlist to Google Music
October 11, 2012, 22:46
Google Music Manager uploads are based on looking for music files in a particular directory. This isn't helpful if you have a large directory structure of…
- Stripping Unicode Byte Order Mark to resolve SolrException: undefined field: "?myField" during Ingest
August 17, 2012, 14:38
Solr has a handy ability to ingest local CSV files. The neatest aspect of which is that you can populate multi-valued fields by sub-parsing an individual…
- Setting default package versions with MacPorts
August 9, 2012, 12:54
Given a working Perl 5.12 install (via MacPorts), doing a sudo port install perl5.16 does not update the perl symlink: % ls -alF /opt/local/bin/perl lrwxr-xr…
- Scala's abstract override, stackable traits, and object hierarchy linearization
August 9, 2012, 10:34
Stackable traits in Scala refers to being able to mix in multiple traits that work together to apply multiple modifications to a method. This involves invoking…
- Mocking Java final classes
July 31, 2012, 10:57
Trying to unit test some code that was to run inside Solr, I bumped into this: Cannot mock/spy class org.apache.solr.core.SolrCore Mockito cannot mock/spy…
- Apache Pig "Not a host:port pair" errors using HBase (2)
July 3, 2012, 15:43
When trying to use Apache Pig in local mode to connect to a stand-alone HBase using HBaseStorage, I kept getting errors like this: ERROR org.apache.pig.tools.g…
- VNC to OS X Lion: Gratuitous Passwords and Empty Grey Linen Desktops (3)
March 28, 2012, 23:36
There are two tricks to using VNC from a non Mac to connect to a Mac running OS X Lion. Turn on the VNC server by enabling System Preferences -> Sharing…
- "ERROR: cannot execute UPDATE in a read-only transaction"
March 12, 2012, 13:56
"ERROR: cannot execute UPDATE in a read-only transaction" is what PostgreSQL tells you when you try to execute an update on a replica instead of on the master.
- Browsing Without Being Tracked
March 10, 2012, 11:03
TL;DR: Install Do Not Track Plus, use Duck Duck Go (with !sp sometimes) for web searches., To go the extra mile also install Straight Google (requires…
- Google's Click Tracking and How to Disable It (1)
March 10, 2012, 10:05
By default, Google tracks every search result you click on. They do this surreptitiously: URLs in Google search results appear to go directly to the destination…
- Fixing key-repeat in OS X Lion (and restoring sanity for Vim keybindings) on a per-application basis (1)
March 2, 2012, 21:06
Starting with OS X Lion, holding down a key will bring up a menu of alternate characters rather than repeating the key. (This is a feature). There are many…
- Inserting newlines with sed on OS X (1)
March 2, 2012, 20:58
Out of the box, inserting newlines does not work with sed on OS X: % echo foo,bar,baz | sed -e 's/,/\n/g' foonbarnbaz The simple solution is to…
- Random file selections with Python
February 21, 2012, 10:28
After my previous adventures in slicing and dicing a huge XML file, I wanted a means to randomly select files. But first, the directory had so many entries it…
- Thunderbird still displays expunged IMAP messages (6)
February 14, 2012, 22:11
There is lots to be said about the intricacies of IMAP delete flags vs. actual expunging of deleted messages and the confusion caused when something is merely…
- How to treat a bare value as an Array in Ruby
February 8, 2012, 21:40
Often Array(arg) is used for this, but is flawed. Note the last result when applied to a Hash: > Array(42) => > Array() => >…
- Splitting large XML files with xml_split and sed (preserving root element and namespace declaration) (1)
February 8, 2012, 20:47
Slicing up XML files is best done with an XML parser. (Regular expressions, csplit, etc. are too easily confused by arbitrary strings in CDATA sections.)…
- Fixing predicted runtime on APC UPS after replacing battery
November 27, 2011, 01:44
The battery in my APC Back-UPS BR 800 was worn out after years of service, so I bought a replacement from APC.com. However, apcupsd still reported zero runtime…
- error: File name too long during Scala compile
November 17, 2011, 12:17
error: File name too long A common way to install Ubuntu is with an underlying ext4 file system and eCryptfs encrypted home directories. ext4, like many…
- Scala's missing splat operator
October 4, 2011, 00:38
Ruby, Python, and many other dynamic languages have a so-called splat operator that lets you easily invoke a function by providing a list of argument values: d…
- Argumentless git pull and git push (2)
October 3, 2011, 22:55
Pulling and pushing with git can be a bit verbose. This post explains how to get from git pull --rebase origin master and git push origin master to just…
- A Fruitless Search for a Password Bookmarklet (2)
June 15, 2011, 00:41
Using a bookmarklet to store passwords is appealingly simple. Alas, after doing some digging, I couldn't find any viable options. The first concern I came…
- Misadventures in Breaking Actors with Scala Self-Types
June 5, 2011, 23:49
Quick refresher: self-types are commonly used when writing traits that want to proscribe that they get mixed in to a particular class. For example, the…
- Untangling multi-threaded log files
April 12, 2011, 23:59
Yesterday I needed to decipher a log file in which a dozen threads were simultaneously logging messages. Surely there must be tools for this out there. But I…
- Snipping log files by time
April 12, 2011, 23:59
Grepping through log files for lines that match a timestamp is fiddly. It's hard to catch multi-line entries (e.g. stack traces) and to craft a regex that…
- Taming Firefox + Adblock with browser.sessionstore.max_concurrent_tabs
April 4, 2011, 21:27
I tend to have lots of browser tabs open. Even more so with Firefox 4's Panorama feature, which I find handy despite the frustrating limitation that tab groups…
- JSPWiki-translate-perl and HTML::WikiConverter-MoinMoin
March 31, 2011, 01:03
moinmoin-client-crypt was the fun part of a recent Wiki migration project I did. The tedious prelude was getting the content out of an aging JSPWiki version…
- Introducing moinmoin-client-crypt (2)
March 30, 2011, 16:21
I just posted the first release of moinmoin-client-crypt to GitHub. As way of introduction, here's an excerpt from the readme: moinmoin-client-crypt…
- Postgres timezone handling
Generated by Table of Contents Creator v1.6.4.1
by Mark Beljaars
