Sunday, October 28, 2012

Unable to boot into Fedora 17 after upgrading windows 7 to windows 8

Okay, so today i thought of upgrading to the new and improved Windows 8 on my Fedora17 and Windows7 dual boot laptop.

It was a tiring process and took a lot of time, and after finishing the upgrade and playing with Win8 a little, i restarted my system to do some work on Fedora, but after restarting, Win8 started by itself, there were no options to select any option to boot into linux.

That was when i felt like beating myself up for upgrading windows. This feeling was much intensified after reading that Win8 uses SecureBoot and there are no ways to as of now to dual boot it.

Thursday, October 11, 2012

Get value of an attribute before being type-casted by rails

There are times when we might need the value of an attribute before rails type-casting it.

Suppose obj is the object and attrib is the attribute whose value we need before ActiveRecord type-casted it, there's a method we can use to get the value of that attribute it was before being type-casted, which works as follows:

Friday, October 5, 2012

Get non-https urls for images while using when storing images on Amazon S3, using Paperclip and Fog.

What you can do is, the hash where you specify the options for paperclip, how it connects to the S3 server, ie something like this