hacking life….

Installing Oracle JDK with apt


Easy as…

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

To set as the default version…

sudo apt-get install oracle-java7-set-default

Enjoy a nice brew


I’ve been using a mix of Fink and MacPorts on my Macs, but it has always felt clunky. If you feel the same you might want to try Homebrew, an absolutely slick replacement.

Homebrew uses Git as the underlying mechanism for the formulas, small Ruby scripts that contain the installation configuration for a package. This mean that you can write your own recipes or simple modify an existing one to suit your needs.

Getting Groovy with the Armory


The Groovy Language is a great Agile language and the WoW Armory is a cool site for getting information from the World of Warcraft game. Combine the two and you can get some very useful information quickly.

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.1' )

import groovyx.net.http.HTTPBuilder
import groovy.util.slurpersupport.GPathResult
import static groovyx.net.http.Method.GET
import static groovyx.net.http.ContentType.XML

def armoryUrl = "http://armory.wow-europe.com/" // EU Server
def realm = "Realm"  // Change to your realm
def name = "Char"    // Change to your character name
def userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061204 Firefox/"

def http = new HTTPBuilder()

http.request( armoryUrl, GET, XML ) { req ->
  uri.path = 'character-sheet.xml'
  uri.query = [ r: "${realm}", n: "${name}" ]
  headers.'User-Agent' = userAgent
  headers.Accept = 'application/xml'

  response.success = { resp, xml ->
    assert resp.statusLine.statusCode == 200

    // This will fetch the battleGroup attribute from
    // <characterInfo><character battleGroup="somevalue"></character></characterInfo>
    println "Battle Group: ${xml?.characterInfo.character.'@battleGroup'.text()}"

    // This will fetch all the xml nodes under baseStats
    xml?.characterInfo.characterTab.baseStats."**".findAll {
        print "${it.name()}: "
        it.attributes().each() { key, value -> print "${key} = ${value} " };
        println ""

  response.'404' = {
    println 'Not found'

  // Used for all other failure codes not handled by a code-specific handler:
  failure = { resp ->
    println "Unexpected failure: ${resp.statusLine}"

Why not try changing the code to fetch the spell.bonusDamage and display that.

Fixing Eclipse XML Validation


Getting XML validation errors in Eclipse when using ActiveMQ namespaces?

Well here’s how to fix it.

In Eclipse, Windows->Preferences->XML->XML Catalogue

Add a new User Specified Entry

Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
Key Type: Namespace Name
Key: http://activemq.apache.org/schema/core

Add another entry

Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
Key Type: Schema Location
Key: http://activemq.apache.org/schema/core/activemq-core.xsd

Click OK and re-validate your XML and all should be fine.

Simple Calculator written in Flex


At my job the project I am currently working on required a very simple calculator for a web-based exam. The requirements were a reasonable light-weight and multiple browser support, but after a lot of Googling I came to the conclusion that the best solution was to write one from scratch and Open Source it. So after a few hours work here is my first Adobe Flex application.

If you are interested in getting the source code you can get it from http://github.com/jasonfagan/flex_calculator/

To build the application you will need to download and install the Open Source Flex 3 SDK from http://www.adobe.com/products/flex/

Find the source archive for an installed package in apt


Sometimes you want to know which archive was used to install a package in apt. Well it’s quite simple really, open a terminal and type

apt-cache policy package-name

Easter? No, but here’s some eggs


Here is some of my favourite easter eggs (a little surprise left in an application by the programmers). Whilst these have worked for me, they may not work for you and I can not accept any liability for your disappointment, try these at your own risk.

Open Office Star Wars

  1. Go to the spreadsheet application in the OpenOffice
  2. Go to any cell
  3. Type in: =game()
  4. The response will be “say what?”
  5. Type in: =GAME(“StarWars”)
  6. Press the enter key — the opening screen shows up
  7. Pick your icon — a message will appear in German
  8. Pick your level (again, in German)
  9. Click ‘start’

Fishy Linux?

  1.  In Linux (Ubuntu 8.10 in this case), press Alt-F2
  2. In the box, type: free the fish

Ubuntu contains alien technology?

  1. In Linux (Ubuntu 8.10 in this case), press Alt-F2
  2. In the box, type: gegls from outer space

The cows ate my packages

  1.  On Debian-based Linux distros (works in Ubuntu too) ,
    go to Applications > Accessories >Terminal
  2. Type in: aptitude moo
  3. After the response, type: aptitude -v moo
  4. After the response, type: aptitude -v -v moo
    (At this point, after the computer program argues with you, you’re just adding one more -v each time.) Remember that five is your lucky number!

Firefox and killer robots

  1. In Firefox 3, go to the Location bar
  2. Type in: about:robots

Book of Mozilla

  1. In Firefox location box, type: about:mozilla

Life goes on……


Well like 98% of all blogs this one is lacking in content. Why? well is my life really that interesting? nah… Uh oh I’m talking to myself on my own blog, this is way too sad… Oh and there are those dots….. argh!… must….stop…..

Ok mad moment over with.

So not much to talk about really. But here is some things that have caught my interest in the last few months.


I popped back to blighty a few months back (yes it’s been that long) to see my family and basically sell my beloved Triumph motorcycle. While back I had time to chill with my mum, step-dad and their friends and listen to some cool music, which is how I came across Rodrigo y Gabriela, not my normal choice at the music store, but I really liked it.


I’ve been dabbling with a few languages & software frameworks, in particular Groovy and Grails, I’m not too sure of the practical applications for the stuff I am developing at the moment as the hosting provider doesn’t allow hosting of Grails, so I’m sticking to Ruby on Rails for that. But any way, keep your eyes on this blog and hopefully I will reveal more about my experiences.


I finally got seduced by the dark-side and bought a Google G1 Android developer phone it ended up being way cheaper to sign up for the developer program and buy the phone from the states, than sign up for an extortionist 2 year contract in the Netherlands.

First impressions of the phone is that it is slow starting up (so I don’t turn it off) and it eats the battery when you play with it too long. However that said, the GPS integration with Google maps is cool, but Google Sky map is fantastic.

My next step is to start writing some simple apps for the phone, at the moment I am stumped for an original idea, but I have an idea simmering in my mind.


Now I live in the Netherlands I have to make the effort to learn the language, so far I have done ok, I can read a bit, have conversations, buy stuff and even get a discount. But now it is time to get serious and stop speaking NEngels, so I have decided to put aside more time to study. Wish me luck :)

Well that’s it for now, check back in another year and I might of posted something else (joke).

The First Rule of Fight Club is….. Kinetic Typography


Just awesome…

What the Frack!!



You tired of all the “kiddy-speak” that you just don’t understand, are you completely Fracked-off with the whole jibberish??

http://en.wiktionary.org/wiki/ will clear things up…..may be…..