“...I've been working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix and learning Rust. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working for InPay...”

Rob Lacey (contact@robl.me)
Senior Software Engineer, Brighton, UK

Skype doesn't work in Karmic Koala

I had to uninstall the Jaunty package from Multiverse…

apt-get remove skype skype-common

…and then re-install the 8.10+ version from Skype. You may need to restart pulseaudio and mute and un-mute the microphone it working again.

dpkg -i http://www.skype.com/go/getskype-linux-beta-ubuntu-64


Karmic Koala doesn't actually add the kernel to menu.lst

I had sever issues this morning after last night’s upgrade from Ubuntu Jaunty to Koala. Xorg was constantly at 98%, sound was broken, and the whole system was completely unresponsive.

Looking in /boot/grub/menu.lst I noticed the upgrade hadn’t actually added the new kernel at all. So I copied to config for the previous kernel and updated it to the new 2.6.31-14 kernel and on reboot we have sound and Xorg is now playing nicely at about 2% CPU. Panic over.

title   Ubuntu 9.10, kernel 2.6.31-14-generic
root    (hd0,0)
kernel    /boot/vmlinuz-2.6.31-14-generic root=UUID=a3c5e83c-f5f2-4704-8bd9-530ecf71f9e5 ro quiet splash acpi_osi="Linux"
initrd    /boot/initrd.img-2.6.31-14-generic

title   Ubuntu 9.04, kernel 2.6.28-11-generic
root    (hd0,0)
kernel    /boot/vmlinuz-2.6.28-11-generic root=UUID=a3c5e83c-f5f2-4704-8bd9-530ecf71f9e5 ro quiet splash acpi_osi="Linux"
initrd    /boot/initrd.img-2.6.28-11-generic

HR Giger Ibanez

I saw this about a year ago, it doesn’t have 7 strings….but its the most gorgeous piece of electromological greatness I’ve seen in a while. I guess the only issue is that I wouldn’t want to ruin a work of art by actually playing it.

Shirts and Destroy

My favourite independant T-Shirt manufacturer and store, Shirts and Destroy have two new Agoraphobic Nosebleed shirts in stock.

Just a quick quote from their site…

The profits for the items you buy here go to the Bands and Artists we work with. So you really are SUPPORTING these bands and artists when you shop with us. We strictly work with people who’s art we respect and admire. Nothing is sold here that we don’t stand behind artistically 100%. If something offends you were not sorry… this isn’t the mall. Thanks for helping us do our part in supporting independent art and music.

Basically, they rock! Help support the bands you love.

High Heels From Hell Vs The Undead

Really liking this one…

Stubbing out live calls to via Facebooker

I just can’t find a way to stub out Facebooker::Service, this just didn’t seem to work.

fs = mock_model(Facebooker::Service, :post => "1")

So finally I used.

describe FacebookPublisher do

  class Facebooker::Service
    def post(*args)
      return "1"

  it "just should ok" do
    Facebooker::Session.create.<some method thingy>


ActionMailer with ActiveRecord validation

I wanted to be able to send out a mail from a controller but also validate the incoming args in a clean way. Like so…

class MessagesController < ActionController::Base

def deliver
  @message = Message.build(params[:message])
  if @message.deliver
    redirect_to home_path
    render :action

ActionMailer::Base hides the initialize methods in method_missing and most of the time you are calling ActionMailer::Base.deliver_mymail(args). This allows you to specify all of the standard actionmailer settings in Message.build and return a Message object.

class Message < ActionMailer::Base

  include Validatable
  validates_presence_of :from, :body

  def self.build(args = {})
    new('default', args)

  def self.action_mailer_methods
    return [

  def default(args)
    new_args = args.clone
    new_args.each do |k,v|
      if self.class.action_mailer_methods.include?(k)
        send(k, new_args.delete(k))

    if body.kind_of?(Hash)


  def deliver
    if self.valid?
      return deliver!
      return false


Pandora console

The Pandora

…the most powerful gaming handheld there is….

  • ARM® Cortexâ„¢-A8 600Mhz+ CPU running Linux
  • 430-MHz TMS320C64x+â„¢ DSP Core
  • PowerVR SGX OpenGL 2.0 ES compliant 3D hardware
  • 800×480 4.3" 16.7 million colours touchscreen LCD
  • Wifi 802.11b/g, Bluetooth & High Speed USB 2.0 Host
  • Dual SDHC card slots & SVideo TV output
  • Dual Analogue and Digital gaming controls
  • 43 button QWERTY and numeric keypad
  • Around 10+ Hours battery life

Now, I’ll need some more freelance work to get my hands on one of these.

Oooh....erb templates in javascript

Found this ERB for jQuery script this morning from Dan Webb


// ERB style templates for jQuery in hardly any code.
// Based on http://ejohn.org/blog/javascript-micro-templating/
// A tiny and simple plugin to allow erb style template rendering within jQuery.
// Make a template:
// <script type="text/html" id="template1">
// <% $.each(items, function(i, image) { %>
//   <p><img src="<%= image.media.m %>" alt="<%= image.title %>"></p>
// <% }); %>
// </script>
// Render the template into the dom with some data:
// <script type="text/javascript">
// jQuery(function($) {
//   $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=jordan%20III&format=json&jsoncallback=?", function(data) {
//     $('#test').render('template1', data);
//   });
// });
// </script>
// Alternatively, you can load templates from files:
// $('#test').render('template.ejs', data);

jQuery(function($) {
  var cache = {};
  function compile(source) {
    return new Function("obj",
          "var p=[],print=function(){p.push.apply(p,arguments);};" +
          "with(obj){p.push('" +
            .replace(/[\r\t\n]/g, " ")
            .replace(/((^|%>)[^\t]*)'/g, "$1\r")
            .replace(/\t=(.*?)%>/g, "',$1,'")
        + "');}return p.join('');");
  function load(template) {
    if (!(/\W/).test(template)) {
      return compile($("#" + template).html());
    } else {
      var source;
        async: false,
        url: template,
        dataType: 'text',
        success: function(data) {
          source = data;
      return compile(source);
  $.template = function(template, data) {
    var fn = cache[template] = cache[template] || load(template);
    if (data) return fn(data);
  $.fn.render = function(str, data) {
    return this.each(function() {
      $(this).html($.template(str, data));

Lazarus, pimping up music since 2009