Convert Ruby 1.8 to 1.9 hash syntax

thoughtbot:

In vim, for an entire file:

:%s/:\([^ ]*\)\(\s*\)=>/\1:/g

In the shell, for an entire project:

perl -pi -e 's/:([\w\d_]+)(\s*)=>/\1:/g' **/*.rb

Now, instead of those old-school hashes like this:

get '/', :agent => MOBILE_BROWSERS do

You’ll have new-school hashes like this:

get '/', agent: MOBILE_BROWSERS do

Tech newsletters

Just to share some newsletters I subscribe to. We all live in a world filled with noise and interruption. Sounds old school, but this is how I manage all the constant updates in tech world.

This way I don’t have to lurk HN, Reddit or other places while keeping focus on other important stuffs for the week.

Check these out.

Apart from above I do subscribe to some weekly newsletter over at StackExchange (StackOverflow, ServerFault, Programmers) just to get a glance at good questions/tips on related stuffs.