Skip to content

Instantly share code, notes, and snippets.

View iomz's full-sized avatar

Iori Mizutani iomz

View GitHub Profile
@tily
tily / generate-party-conversation.rb
Created February 11, 2012 08:04
Twitterの人と飲み会とかで会ったときに話せばいいことを相手に対する favorite のログから生成する
# coding:utf-8
require 'rubygems'
require 'mongo'
include Mongo
# USAGE: ruby generate-party-conversation.rb tily todesking
me, target = ARGV
templates = DATA.read.split("\n")
db = Connection.new.db('twitter')
@hitode909
hitode909 / shuffle_animation_gif.rb
Created January 14, 2012 07:12
shuffle_animation_gif.rb
# -*- coding: utf-8 -*-
require 'rubygems'
require 'RMagick'
filename = ARGV.first
unless filename
warn "usage: #{$0} <ANIMATION GIF FILE>"
exit 1
end
# -*- coding: utf-8 -*-
require 'glitch-ime'
input = ARGV.first
text = input + input.split(//).reverse[1..-1].join('')
ime = GlitchIME.new(text)
10.times {
@tbtlr
tbtlr / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',