This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
NewerOlder