Insights on Ruby, Git, jQuery, Cappuccino, WordPress, Debian and OS X. Please subscribe if you find something useful!

Create Arbitrarily Sized Files In Less Than 15 Lines of Ruby

Posted: May 22nd, 2009 | Author: Jerod | Filed under: Ruby | Tags: , | Comments

Ok, so I’m having fun with this “in less than 15 lines of Ruby” idea, but this time I turn my attention away from Twitter (I know, that’s hard to do right now) and toward file generation.

Sometimes you just need a 1GB file. Or a 350MB file. Or a 1MB file. It doesn’t matter what is in that file, but size does matter (heh).

With this little Ruby script, you can arbitrarily generate files of any size (using 1MB increments).

The Script:
Read the rest of this entry »


Expand Your Twitter Network In Less Than 15 Lines of Ruby

Posted: May 17th, 2009 | Author: Jerod | Filed under: Ruby | Tags: , | Comments

A great way to meet new people on Twitter is by checking out the people your friends are interacting with. We can assume that if many of your friends follow somebody, that person has a high likelihood of being interesting to you (or it is Ashton Kutcher). Let’s use Ruby to generate a list of people highly followed by our friends.
Read the rest of this entry »


See Which Twitterers Don’t Follow You Back In Less Than 15 Lines of Ruby

Posted: May 12th, 2009 | Author: Jerod | Filed under: Ruby | Tags: , | Comments

The asynchronous nature of Twitter is one of its keys to success. No friend requests. Awesome.

A lot of the people I follow on Twitter have no business following me. I did’t get upset when DHH, _why, and alexalbrecht did not reciprocate interest. Why would they? They don’t know me from Adam (even though I’m waayyy cooler than that dude…).

However, sometimes it is interesting to see all the jerks people who you follow that do not follow you back. There’s probably a web application out there that does this, but who needs a web app when this is a perfectly good excuse to play with Ruby?

The twitter gem by John Nunemaker makes this task so easy it’s retarded. First, get the gem if you don’t already have it:

sudo gem install twitter

Now. The script:
Read the rest of this entry »