Monday, January 25, 2016

The Kampala Heat (cocktail recipe)

The Kampala Heat - A cocktail recipe


1 shot of Smirnoff Vodka
1 shot of Dry Red Wine
1 shot of Sprite (Fizz)
1 shot of Undiluted Orange Juice

Served on the rocks

Thursday, January 21, 2016

Offline Caching for decarta tiles

While developing a Geo mapping application recently, I found myself needing to work offline for extended periods of time. I needed a cache for the tiles and because someone other than me may need to configure this, so here is the solution that ended up using.

Friday, November 14, 2014

Amusing line

Today I read this amusing line in an official letter sent from the office landlord to us concerning a gentleman he seconded to us.

"I have withdrawn my secondment"

Highly amusing

Sunday, March 24, 2013

making Firefox for Android the default browser

I love Firefox the browser. I want it to the default on my Nexus 4.

Saturday, February 09, 2013

KDE 4.10

When following the post about building KDE software from git.kde.org the easy way on my laptop running sid (installed using debootstrap), and using the kdesrc-build tool (kdesrc-build.kde.org) I run into a few packages that are not mentioned on the techbase article for building kde for Debian from source.

Monday, December 03, 2012

perlbrew options that i use

perlbrew install perl-5.10.1 -Dusethreads -Duselargefiles -Dcccdlflags=-fPIC -Doptimize=-O2 -Duseshrplib -Duse64bitall

Saturday, September 15, 2012

tweaking psql in color

Merlin Moncure recently posted a blog entry about psql now in color.

I tried it but got some issues when run. man pages in particular were failing to show properly.

The solution was quite simple: unset LESS and PAGER variables *after* running psql.

so my .bashrc now has this nice function in it

psql() {
    YELLOW=$(printf "\e[1;33m" )
    LIGHT_CYAN=$(printf "\e[1;36m" )
    NOCOLOR=$(printf "\e[0m"    )

    export LESS="-iMSx4 -FXR"

    PAGER="sed \"s/\([[:space:]]\+[0-9.\-]\+\)$/${LIGHT_CYAN}\1$NOCOLOR/;" 
    PAGER+="s/\([[:space:]]\+[0-9.\-]\+[[:space:]]\)/${LIGHT_CYAN}\1$NOCOLOR/g;" 
    PAGER+="s/|/$YELLOW|$NOCOLOR/g;s/^\([-+]\+\)/$YELLOW\1$NOCOLOR/\" 2>/dev/null  | less"
    export PAGER

    env psql "$@"
    unset LESS PAGER
}