Posted by
jp on May 10th, 2010 in
projects,
ruby,
tech |
0 comments
Recently I felt the need to have some kind of time tracking tool, so I wrote a simple one in ruby. It requires only two gems to work (‘rubygems’ and ’sqlite3-ruby’).
It is definitely a work in progress, but right now it is very easy to use and it gives reports for the last few days, last 3 weeks, and current month. Also, for mac users, it has the option to change your Adium statuses using...
Posted by
jp on Apr 30th, 2010 in
blog,
ruby,
tech |
2 comments
Recently I’ve heard about Max Howell’s homebrew and Wayne E. Seguin’s rvm from a friend (caffo), and hearing that they were both pretty cool, I decided to give them a shot.
So if, like me, you are curious about these tools, I’ll post what I did to install them.
First I made backups (by moving some folders around)
mv ~/.gem ~/gems-old
sudo mv /opt/local ~/macports-old
You could also install...
Posted by
jp on Oct 26th, 2009 in
blog,
ruby,
tech |
1 comment
I’ve always tried to make my scripts’ responses prettier and less crowded, and I came across something like the following piece of code, that helped me a lot lately
#!/usr/bin/env ruby
STDOUT.sync = true
bars = ['/','-','\\','|']
i=1
while i do
print "\rrunning #{bars[i%4]}"
i += 1
sleep 1
end
trap("INT") {
print "\n\n"
exit
}
If you like to see updates without flooding your terminal screen, this is...