Toys: March 2007 Archives

Episode 3 of the "Stupid Thing I Wrote", figure out the worst actors on IMDB:

  1. 194 Paris Hilton (The Hillz, Bottoms Up)
  2. 183 Jim Varney (Snowboard Academy, 3 Ninjas: High Noon at Mega Mountain)
  3. 177 Hulk Hogan (Santa with Muscles, 3 Ninjas: High Noon at Mega Mountain)
  4. 174 Kal Penn (Son of the Mask, Epic Movie, Van Wilder 2: The Rise of Taj)
  5. 171 Clint Howard (Santa with Muscles, House of the Dead)
  6. 168 Jack McGee (Chairman of the Board, Cool as Ice)
  7. 164 Corey Haim (Snowboard Academy, Last Resort)
  8. 162 Deezer D (In the Mix, Cool as Ice)
  9. 159 Gary Anthony Sturgis (Daddy's Little Girls, Pride)
  10. 157 Myles Fitzgerald (SuperBabies: Baby Geniuses 2, Baby Geniuses) / Gerry Fitzgerald (SuperBabies: Baby Geniuses 2, Baby Geniuses) / Leo Fitzgerald (SuperBabies: Baby Geniuses 2, Baby Geniuses) / Will Sanderson (House of the Dead, Alone in the Dark, BloodRayne)
  11. 153 Gabrielle Union (Daddy's Little Girls, The Honeymooners)
  12. 151 Terrence Howard (Glitter, Pride)
  13. 150 Valarie Pettiford (Glitter, Stomp the Yard) / Jack Warden (Chairman of the Board, Ed) / Mickey Knox (Ghosts Can't Do It, Bolero, Ghoulies II)
  14. 142 Kevin Smith (Bottoms Up, Doogal)
  15. 138 Jürgen Prochnow (House of the Dead, Primeval)
  16. 136 Meagan Good (Stomp the Yard, You Got Served)
  17. 127 Bo Derek (Ghosts Can't Do It, Bolero)
  18. 123 Victor Wong (3 Ninjas: High Noon at Mega Mountain, Shanghai Surprise)
  19. 116 Jon Polito (The Honeymooners, Happily N'Ever After)
  20. 110 Billy Zane (Going Overboard, BloodRayne)

code after the cut.

It makes me sad that "You Got Served" is no longer the worst movie on IMDB.

PNG is an almost-pure-ruby PNG library. It lets you write a PNG without any C libraries.

FEATURES

  • Very simple interface.
  • Outputs simple PNG files with ease.
  • Basic PNG reader as well (someday it might do compositing and the like!).
  • Almost pure ruby, does require a compiler.

SYNOPSYS

require 'png'

canvas = PNG::Canvas.new 200, 200

# Set a point to a color
canvas[100, 100] = PNG::Color::Black

# draw an anti-aliased line
canvas.line 50, 50, 100, 50, PNG::Color::Blue

png = PNG.new canvas
png.save 'blah.png'

Changes:

1.1.0 / 2007-03-26

  • 4 major enhancements:
    • Fixed and incorporated Dominik Barathon's optimizations.
    • Wrote inline methods for pngcrc and pngjoin. Now about 15x faster overall.
    • Basic PNG loading.
    • Reoriented x/y origin to bottom left. This will break things!
  • 3 minor enhancements:
    • Awesome ascii art patches from Tom Werner: Canvas#inpsect, Canvas#tos, Color#toascii.
    • Switched to Hoe.
    • PNG.pie_chart from png/pie.
  • 1 bug fix:
    • Fixed bug in PNG::Canvas#each.

Allows you to lay out HTML using ASCII art. Stolen from psykotic's code posted to reddit: http://programming.reddit.com/info/k9dx/comments

SYNOPSIS:

require 'box_layout'

page_template = <<-END
----------
|        |
----------
| |    | |
| |    | |
| |    | |
| |    | |
----------
|        |
----------
END

layout = BoxLayout.html page_template
puts "<title>cute</title>"
puts "<style>* { border: 1px solid black }</style>"
puts layout % %w[header left body right footer].map {|s| "**#{s}**" }

1.0.0 / 2007-03-24

  • 1 major enhancement
    • Birthday!
require 'rubygems'
require 'ruby2ruby'

p = proc { |x| x + 1 }
puts p.to_ruby
# => proc { |x|
#      (x + 1)
#    }

This script sifts through your iTunes DB and tells you what you really like to listen to. It told me that my mental list of my top N and my actual listening habits disagree. It also illustrates that you don't need to parse XML if it is well formed and it can be way faster than rexml and the other xml-overkill libraries.

  1. = (2306 tot, 327.33 adj): Everything! (Disc 2) by Tones On Tail
  2. = (2295 tot, 316.93 adj): Mezzanine by Massive Attack
  3. = (2026 tot, 293.42 adj): Earth Sun Moon by Love & Rockets
  4. = (1789 tot, 259.74 adj): Kakusei by DJ Krush
  5. = (1700 tot, 241.82 adj): Staring At The Sea: The Singles 1979-1985 by The Cure
  6. = (1753 tot, 240.61 adj): 100th Window by Massive Attack
  7. = (1307 tot, 224.80 adj): Nouvelle Vague by Nouvelle Vague
  8. = (1458 tot, 207.87 adj): Substance 1987 (Disc 1) by New Order
  9. = (1342 tot, 194.84 adj): Meiso by DJ Krush
  10. = (1351 tot, 192.62 adj): Express by Love & Rockets

See the code after the cut.

Hopefully this will become a series that will let me clean out my Work/misc dir, but "That Stupid Thing I Wrote The Other Day" needs to be changed because TSTIWTOD is a lame acronym. Suggestions?

I use this to populate my iPod with all my music so I don't get confused in music stores:

music = Hash.new { |h,k| h[k] = [] }

Dir.chdir File.expand_path("~/Music/iTunes/iTunes Music") do
  Dir["*"].sort.each do |artist|
    artist_name = artist.sub(/^The (.*)/, '\1, The')
    Dir.chdir artist do
      Dir["*"].sort.each do |album|
        music[artist_name] << album
      end
    end
  end
end

dir = "/Volumes/NanoSpider/Notes/"
dir = test(?d, dir) ? dir : Dir.pwd
out = $stdout
last = nil

music.sort_by { |k,v| k.downcase }.each do |artist, albums|
  letter = artist[0..0].downcase
  if last != letter and dir then
    out.close
    out = File.open("#{dir}/music-#{letter}.txt", "w")
    last = letter
  end
  out.puts "#{artist}:"
  out.puts "  #{albums.sort.join("\n  ")}"
end

out.close if dir

About this Archive

This page is a archive of entries in the Toys category from March 2007.

Toys: September 2006 is the previous archive.

Toys: April 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1