Ruby Time.parse, Time. strptime and Time zones

This is a note to myself. So it might not be entirly useful to other folks. Note: my system’s time zone is set to +1000 Brisbane time. Recently I stumbled accross a bug in our code base where, Time.parse was used (incorrectly) to create a Time object from a string. Time and specially Time.zone related stuff tend to be very complicated and is quite easy to misunderstand. The whole codebase was full of lines of code like the following: ...

May 14, 2014

Installing gems with native extensions on TravisCI

I was mucking around with TravisCI recently. And when I was setting up a Rails project with travis. I hit a wall trying to get a ruby gem (https://github.com/da4nik/geoip2) with a native extention (https://github.com/maxmind/libmaxminddb) to get to install on travis. Thanks to GeoIP2-python (https://github.com/maxmind/GeoIP2-python/blob/master/.travis.yml)'s travis.yml I figured out how to solve the issue. It’s pretty straight forward really. Travis builds your project on a Ubuntu machine on cloud. So you’d install anything on it just as you would on a Ubuntu box. ...

May 13, 2014

virt-resize --shrink : Resizing a KVM VM Storage Image (which is a LVM partition)

I had to do some work relating to kvm last week. Including resizing (shrinking) a existing VM and then making a clone of it. I had to do a fair bit of googling and tinkering around to figure out how this can be done. Below is a summary of what I ended up doing. Note The fact that the storage images of the VMs were infact LVM partitions played a part in how I had to go about doing the resizing. In retrospect, if LVM was out of the picture (and the if the images were just files) things would have been much easier. Of course this does not mean that LVM + KVM is a bad thing. It makes things a little bit more complicated though. ...

April 9, 2014

Renting a room in Australia

I recently moved to Gold Coast, Queensland, Australia. Finding accommodation seemed a bit daunting at first. I was looking to a rent a room, or shared accommodation in other words. If you are in the same situation the following information should make things a bit easier for you. And of course most of the information bellow is not Queensland specific. Sites Best sites to find rooms for rent (housemates, flatmates, house share…etc) ...

April 6, 2014

How I went about finding a new programming Job

Disclaimer: As the title mention these are the things that I did when finding a job. It may or may not apply to you. Depending on your background as a candidate and your preferences when finding a job. This information might also be location/role/tech…etc specific. And if you are a rockstar developer, you won’t need any of this. You can join pretty much any startup you fancy. And the odds are you already have a zillion people spamming you with job offers. But if you are not, this might help you. ...

April 1, 2014

Blogging from a mobile

So I am now typing this post from my iPhone. And I kind of miss auto-correct. typing a post with the mobile keyboard is not as smooth as doing the same with a desktop. however, it’s quite possible. Ghost seems to be emulating a text field in the browser. as in I am typing this post in a none native text field. So this is the reason that I miss some of the features that I’ve come to expect from a mobile keyboard. Including but not limited to auto capitalization of letters, spelling correction and auto completion of words. I had a lot of trouble selecting the text box to start editing it aswell. And this is my biggest complain so far. Other than that I think this works fine. Certianly a step in the right direction.

January 17, 2014

Starting off with Ghost

So I finally brought in to the Dighital Ocean hype and brought a server at 5 USD/month (thats cheap!). And now that I have a server sitting idel, what do I do with it? Setup a VPN server of course! But once I finished with that I wanted to try out Ghost. The latest blogging platform running on node.js. Setting it up was a breez although, I did hit a few road blocks along the way. I set it up with nginx, everyone’s favorite web server. I was then asked to sign up for an admin account, which I did. And I was ready to go! ...

January 17, 2014