This file contains hidden or 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 macruby | |
# encoding: utf-8 | |
require 'ubygems' | |
require 'digest/md5' | |
framework 'cocoa' | |
framework 'ScriptingBridge' | |
# http://www.johnmyleswhite.com/notebook/2009/11/20/cleaning-up-an-itunes-library-with-macruby/comment-page-1/#comment-17798 |
This file contains hidden or 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
#!/bin/sh | |
bundle gem $1 | |
cd $1 | |
rspec --init |
This file contains hidden or 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
import android | |
droid = android.Android() | |
while True: | |
word = droid.recognizeSpeech().result | |
droid.ttsSpeak(word) | |
print word |
This file contains hidden or 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
import android | |
droid = android.Android() | |
droid.view('http://eow.alc.co.jp/sp/search.html?q=' + droid.recognizeSpeech().result) |
This file contains hidden or 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
curl -L http://cpanmin.us | perl - -l ~/local/perl5 App::cpanminus local::lib | |
echo 'eval `perl -I ~/local/perl5/lib/perl5 -Mlocal::lib=~/local/perl5`' >> ~/.zshrc |
This file contains hidden or 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
require 'ubygems' | |
require 'itunes_observer' | |
require 'eventmachine' | |
class EventMachine::ITunesWatch | |
def initialize | |
@observer= ITunesObserver.new | |
@observer.on_pause do |result| | |
paused(result) | |
end |
This file contains hidden or 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 | |
# encoding: utf-8 | |
# usage: | |
# $ command arg1 arg2 arg3 | hee | |
require 'pathname' | |
$kcode = 'u' | |
$stdout.sync = true | |
# # .zshrc |
This file contains hidden or 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 | |
%w|ubygems pathname pit erb|.each {|g| require g } | |
def read_sections | |
sections = {} | |
section = nil | |
DATA.readlines.each do |line| | |
if line =~ /^@@\s+(.+)/ | |
section = $1 | |
elsif section |
This file contains hidden or 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 | |
# usage | |
# $ $(export_heroku_config.rb | grep OAUTH) | |
config = `heroku config` | |
config.split(/[\r\n]/).each do |line| | |
key, value = line.chomp.split(/\s+=>\s+/) | |
puts "export #{key}=#{value}" | |
end |
This file contains hidden or 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
// ==UserScript== | |
// @name internet | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://www.ntticc.or.jp/Exhibition/2012/Internet_Art_Future/index_j.html | |
// @version 0.3 | |
// @updateURL https://raw.github.com/gist/1727155/internet.user.js | |
// ==/UserScript== | |
var serverUrl = 'http://c3581516868fb3b71746931cac66390e.no.de/'; | |
var script = document.createElement('script'); |