Skip to content

Instantly share code, notes, and snippets.

@mickey24
mickey24 / parser.rb
Created August 19, 2010 10:15 — forked from yagays/parser.rb
#/usr/bin/env ruby
def open_t_delimited_file(filename)
h = {}
open(filename) {|f|
f.each_line do |line|
a = line.split("\t")
h[a[0]] = a
end
}
#!/usr/bin/env ruby
# twit_anime_icon.rb
# convert an animated gif file to an uploadable format for Twitter.
infile = ARGV[0] || ""
outfile = ARGV[1] || "output.gif"
if infile.empty?
puts "usage: #{$0} input.gif [output.gif]"
// http://okajima.air-nifty.com/b/2010/01/post-abc6.html
#include <iostream>
#include <vector>
#include <deque>
#include <string>
#include <utility>
#include <climits>
using namespace std;