Skip to content

Instantly share code, notes, and snippets.

@hrickards
Created August 26, 2011 14:42
Show Gist options
  • Save hrickards/1173557 to your computer and use it in GitHub Desktop.
Save hrickards/1173557 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'humanize'
require 'open-uri'
(2..99).each do |number|
filename = "map_marker_#{number.humanize.gsub('-', '_')}.png"
url = URI.parse URI.encode("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=#{number}|FF776B")
open(filename, 'wb') do |file|
file << open(url).read
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment