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
%w!ubygems scissor!.each {|g| require g } | |
s = Scissor(ARGV.shift) | |
s.stretch((((20*60)+12) / s.duration) * 100).to_file('2012.mp3', :bitrate => '320k') |
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
# OSX only | |
%w/ubygems grope pit/.each {|g| require g } | |
def main | |
url = 'https://www.facebook.com/' | |
env = Grope::Env.new | |
env.load(url) | |
if env.document.title !~ /^Facebook/ |
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 scissor/.each {|g| require g } | |
#Scissor.logger.level = Logger::DEBUG | |
if ARGV.size < 2 | |
abort 'usage: %s infile ... outfile' % $0 | |
end | |
outfile = ARGV.pop |
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
%w!ubygems scissor/echonest pit open-uri tempfile!.each {|g| require g } | |
Scissor.logger.level = Logger::DEBUG | |
Scissor.echonest_api_key = Pit.get('echonest.com', :require => { | |
'api_key' => 'your Echo Nest API key' | |
})['api_key'] | |
infile, outfile = ARGV | |
bd = Scissor('http://dl.dropbox.com/u/334064/909BD.wav') |
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 cookpad.com: diaries feed | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://cookpad.com/diary/list/* | |
// ==/UserScript== | |
var h1 = document.querySelector('h1.kitchen_title'); | |
var image = document.createElement('img'); | |
var a = document.createElement('a'); |
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
@DEFAULT=@NORMAL blogs.yahoo.co.jp= fc2.com= image.itmedia.co.jp=@FORGE plusd.itmedia.co.jp= www.amazon.co.jp= |
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 'formula' | |
class Macports < Formula | |
url 'https://distfiles.macports.org/MacPorts/MacPorts-2.0.3.tar.gz' | |
homepage 'http://www.macports.org/' | |
md5 '7b84e27a6dda3ecd9a72c99c44b3b914' | |
# depends_on 'cmake' | |
def install |
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
module OAuthHelper | |
enable :sessions | |
get '/oauth/auth' do | |
consumer = OAuth::Consumer.new( | |
settings.oauth_consumer_key, | |
settings.oauth_consumer_secret, | |
{ | |
:site => settings.oauth_site, | |
}) |
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
%w!ubygems scissor/echonest pit open-uri tempfile!.each {|g| require g } | |
Scissor.logger.level = Logger::DEBUG | |
Scissor.echonest_api_key = Pit.get('echonest.com', :require => { | |
'api_key' => 'your Echo Nest API key' | |
})['api_key'] | |
infile, outfile = ARGV | |
file = Tempfile.new(%w/amen .wav/) |
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 | |
# OSX only | |
%w/ubygems grope open-uri term\/ansicolor/.each {|g| require g } | |
COLORS = { | |
'warning' => :yellow, | |
'error' => :red | |
} | |
def main |