Works in Progress
Saturday, February 7th, 2009 · 0 comments
It's definitely been a good last few weeks for me. First signed on a project for a garden center, and made some good business connections (both local!), secondly I've almost completed my tumblelog application, which as of yet has no name. The only features missing are a few post types, videos, audio and pictures to be precise. Sure they may be the trickiest to implement, but I love challenges. It should hopefully be done by the next VicRuby meet-up (February 25th, 7:30 PM at the Fernwood Inn), so I can show it off.
Here's a few snippets I've found useful as of late:
#
# I use this to convert pixel font-sizes to ems.
#
def em(pixels)
pixels.to_f / 16.0
end
#
# Gets those nested em line-heights/margins/font-sizes.
# If you know the documents base line-height then it's faster
# to just divide it by the parent's font-size manually.
#
def nested_em(child, parent)
child.to_f / parent.to_f
end
This is my version of Apple's Time Machine, couple it with a cronjob and you're golden.
#!/bin/bash
rsync -avl --delete --stats --progress "/Users/mat/Documents/Important Data" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Legal" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Portfolio" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Programming" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Projects" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/School" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Server" "/Volumes/External HD/Backups/"
rsync -avl --delete --stats --progress "/Users/mat/Documents/Writings" "/Volumes/External HD/Backups/"
That's it for now. There may be a new design in store for my website, but it won't happen till after the release of Rails 2.3.
