Latest Tweets:

*20

Hammer.js - Easily add multi-touch to your websites

thechangelog:

With the continued growth of mobile devices, handling touch (and multi-touch) events is no longer optional. Hammer.js is a small - dependency free - library that makes handling touch events dead simple.

You can easily add tap (touch/click), double tap, hold, drag (touchmove/mousemove), swipe, and transform (pinch) events to your website with very little code. 

var hammer = new Hammer(document.getElementById("hammertime")); hammer.ondoubletap = function(e){ console.log("CAN touch this!"); }; 

Oh, and if jQuery is your thing, they have a simple plugin that you can download as well.

View the demo or browse the source on GitHub.

*4

giant robots smashing into other giant robots: Use Factory Girl's build_stubbed for a Faster Test Suite

thoughtbot:

Want to speed up your test suite? Reduce the number of objects persisted to the database. With Factory Girl, this is really easy; instead of using build or create to instantiate your models with data, use build_stubbed!

build_stubbed is the younger, more hip sibling to build; it…

*5

Redis-faina - query analyzer for Redis

thechangelog:

From folks that know something about scale, the Instagram team has realeased Redis-faina, a tool that parses Redis’ MONITOR command to provide stats on Redis queries:

# reading from stdin
redis-cli -p 6490 MONITOR | head -n <NUMBER OF LINES TO ANALYZE> | ./redis-faina.py

Overall Stats
========================================
Lines Processed     117773
Commands/Sec        11483.44

Top Prefixes
========================================
friendlist          69945
followedbycounter   25419
followingcounter    10139
recentcomments      3276
queued              7

Top Keys
========================================
friendlist:zzz:1:2     534
followingcount:zzz     227
friendlist:zxz:1:2     167
friendlist:xzz:1:2     165
friendlist:yzz:1:2     160
friendlist:gzz:1:2     160
friendlist:zdz:1:2     160
friendlist:zpz:1:2     156

...

Check out the source on GitHub. If you’re new to Redis, Episode 0.4.5 with @antirez is a classic.

*4

Sextant - view your Rails routes without waiting on Rake

thechangelog:

When given the option, I’ll always opt for text mode when completing a task. In Rails that usually means Rake. There’s a point in most Rails apps, however, when the time to boot Rails just to rake -T is painful. So when Richard Schneeman got tired of waiting on Rails to run rake routes, he created Sextant, a gem that lists your routes in development mode right in your browser.

screencap

Since your web server is presumably already booted, there’s no startup tax to see your routes. Check out Richard’s blog post or the source on GitHub for more.