Posts

Showing posts from February, 2010

Ruby script for downloading rails casts

Ryan Bates continuously provide useful Rails tips in this railscasts.com . I had written a bash script for downloading the videos of the episodes in the past. I do not like streaming much and I'd rather keep the episodes for reference. One downside of the script is that I had to check the rss feed or the website for new episodes, and run the script manually passing the correct paramters (start and end of episode ids to be downloaded) Now I decided to get rid of the silly step. so I ported my script to ruby, and it runs down to download whatever episodes are missing using the rss feed and checking what is already present. The script uses simple-rss gem, so you'll have to get that installed. It also uses wget for downloading. I didn't bother using net/http of ruby, wget is fine for me as a linux user. The script flow is simple: Check the current files in the download directory (collecting information) Grab the rss of railscasts.com Iterate over rs...

Gmail search and labels.. a wished feature

Gmail has been my main email engine for years now. I'm totally comfortable with it. The ability to process, distribute and keep up with the flood of emails i get everyday from different resources, and the ability to search and find emails (even the very old ones) easily are the keys behind my loyalty to gmail. Gmail supports some nice techniques that can be used while searching emails. Besides what you can use in the advanced search form. the command line approach (direct control from the simple search box) proves to be even more powerful. Anything that can be controlled in the advanced search form, can also be done from the simple one provided that you know the right parameters. You can specify: to, from, subject, a label, ... What's more exciting is that you can specify several labels to search in, and several labels to be excluded from search. By default you have "read", and "unread" labels. A frequent search query of mine is "l:inbox l:unread...