Wednesday 26 January 2011

Installing Sass on Ubuntu 10.04 Lucid

Sass is a CSS extension that enables you to use variables, nested rules etc. To install it, see their website. If like me, you just try the first command they give you before installing ruby, you will get this:
The program 'sass' is currently not installed. You can install it by typing:
sudo apt-get install libhaml-ruby1.8
Don't do as it says and install libhaml-ruby1.8, as you end up with an old version of Haml/Sass: 2.2.17. Instead, you first need to install Ruby and RubyGems, which is simple:
sudo apt-get install rubygems
Next, we install Sass using RubyGems (thanks for tip from Boyd Hemphill):
sudo gem install sass
You should now have Sass installed, but if you try to use it, you may still get the original "not installed" message. This is because annoyingly the RubyGems binaries directory is not automatically added to your PATH. To do this, I simply added the following to the end of my ~/.bashrc file:
export PATH=$PATH:/var/lib/gems/1.8/bin
Then restart your terminal and that should be it. You can check that it installed successfully, and that you have the latest version with the following command:
sass -v
I get the following output: Sass 3.1.15 (Brainy Betty). You can then follow the rest of the tutorial on their website to start compiling .sass files into .css files.

Additionally, see this blog post for a great walk-through in refactoring existing CSS to Sass.

Monday 24 January 2011

Android Calendar - Duplicate Facebook Birthdays

Device: HTC Legend
OS: Android 2.2 Froyo (with HTC Sense)

In my calendar, I had 2 entries for every birthday on my Facebook calendar. If I went into the calendar options and hid the Facebook calendar, both entries disappeared. I've learnt that this calendar is populated by the Facebook for HTC Sense app.

The solution was to remove the account in my sync settings (Settings>Accounts & sync>Facebook for HTC Sense), do a full sync, and then re-add it the account. My contacts remembered all the facebook link information too, so after re-adding the account and doing a full sync, everything was back just the way it was (inc Facebook pictures in my contact list) except no more duplicate birthday events in my calendar!


REFERENCES
http://www.htcforums.com/android-applications-games/6762-duplicate-facebook-birthday-calendar.html