Adium Top Words (part 2)
Wednesday 12/3/2008 – Category: Uncategorized
I decided to use Shoes (a Ruby graphics toolkit) to create a GUI to make it easier so you don’t have to open terminal at all.
Try it!
Adium Top Words
Saturday 11/29/2008 – Category: Uncategorized
I have a strange habit of periodically going through my chat logs and re-reading random conversations. When I was doing this yesterday, I wondered what my most frequently used words were in IM land.
Since Adium log files are in nice XML format, I decided to write a Ruby script to process all my logs and [...]
Apache and DirectoryIndex
Friday 11/28/2008 – Category: Uncategorized
If you’re getting this error:
Request exceeded the limit of 10 subrequest nesting
make sure your conf file has the DirectoryIndex variable set correctly. I had accidentally copied a conf for a Rails app that had the line
DirectoryIndex /
which was making Apache not serve the index.html file like it usually does. Once I got rid of DirectoryIndex [...]
Getting a random record using datamapper
Thursday 11/27/2008 – Category: Uncategorized
Model.get(1+rand(Model.count))
You’ll have to have dm-aggregates for Model.count to work correctly
ruby strip vs strip!
Thursday 11/27/2008 – Category: Uncategorized
Sorry to disappoint, but this entry isn’t about strippers.
str.strip returns a copy of string str with with whitespace chopped off, while str.strip! returns the same string str or nil if the string wasn’t altered.
I didn’t realize str.strip! would return nil until I was getting a lot of empty strings back…
Recent Posts
- Flickr Original updates
(Saturday 08/7/2010 – 7 Comments) - LED Light for iPhone 4
(Monday 06/28/2010 – 45 Comments) - WWDC 2010: Worth Every Minute
(Monday 06/14/2010 – No Comments) - Flickr Original for Safari 5!
(Wednesday 06/9/2010 – 26 Comments)
