Count unique records with DataMapper
Saturday 01/3/2009 – Category: Uncategorized
dm-aggregates provides an aggregate method that allows for “multiple aggregate functions to be used in a single query, with automatic grouping when :fields is specified”
Hit.aggregate(:ip_address).length
Will yield the number of unique IP addresses in the hits table.
Simple graphing with googlecharts (plus gridlines and markers!)
Saturday 01/3/2009 – Category: Uncategorized
It didn’t occur to me until a day or two after I released Flickr Original that I should probably record usage stats, so I added a few lines of code to track views/downloads. Earlier this week I finally decided to do something with all the data. I decided on a simple line graph [...]
Ranges in Ruby (and .. vs …)
Saturday 01/3/2009 – Category: Uncategorized
Ranges in Ruby are nifty: you can define a set by its start and end values and a range of values will be generated. This works “as long as the objects can be compared using their <=> operator and they support the succ method to return the next object in sequence.”
Ranges created with .. will [...]
Using getSelection() with content in frames
Sunday 12/28/2008 – Category: Uncategorized
An iPhoneSender user recently reported a bug with the Safari bookmarklet not correctly grabbing the selection and suspected it was because the selected content was in frames.
After some digging around, it turns out he was right–if your selection is in a frame, the normal window.getSelection() method will return nothing; you’ll need to target the specific [...]
Easily download full-size Flickr photos with Flickr Original (Firefox extension) (update)
Tuesday 12/16/2008 – Category: Uncategorized
Follow Flickr Original on twitter for status updates
(UPDATE: Version 1.0.8 available!)
(UPDATE: Version 1.0.7 available!)
(UPDATE: Version 1.0.6 available!)
(UPDATE: Version 1.0.5 available!)
(UPDATE: Version 1.0.4 available!)
(UPDATE: New and improved version 1.0.3 available!)
(UPDATE: Firefox 3.5 version available!)
I love Flickr, but sometimes their interface gets in the way and stuff takes more clicks that I’d like. One thing I like [...]
Recent Posts
- Marble Paint
(Friday 02/4/2011 – 1 Comment) - More Flickr Original Updates
(Sunday 01/23/2011 – 13 Comments) - Flickr Original updates
(Saturday 08/7/2010 – 19 Comments) - LED Light for iPhone 4
(Monday 06/28/2010 – 65 Comments)
