
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
cmd :gyast, '', 'post screencapture' do | |
now = Time.now.to_i | |
file_jpg = "/tmp/#{now}.jpg" | |
system "screencapture -i -t jpg \"#{file_jpg}\"" | |
unless File.exist? file_jpg | |
exit | |
end | |
begin | |
url = @g.create file_jpg |

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 | |
require 'rubygems' | |
require 'json' | |
if File.exists? ARGV.first | |
j = JSON.parse(IO.read(ARGV.first)) | |
puts JSON.pretty_generate(j) | |
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
test |
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
test |
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 node | |
var rl = require('readline') | |
var KyotoTycoon = require('kyoto-tycoon').KyotoTycoon | |
var commands = [ | |
'report', 'status', 'clear', 'set', 'add', 'replace', 'append', | |
'remove', 'get', | |
] | |
var kt = new KyotoTycoon() |
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
var http = require('http') | |
// var times = parseInt(process.argv[2] || 5, 10) | |
var urls = [ | |
'/enq/1', | |
'/enq/999999', | |
'/enq/2', | |
'/enq/3', | |
'/enq/4' |
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 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
# how to use | |
# ruby ust_rec.rb http://www.ustream.tv/channel/alpacas-live | |
# | |
# ref | |
# http://give-me-money.g.hatena.ne.jp/fuba/20100714/1279116473 | |
# http://textt.net/mapi/20101018201937/1 |
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
// Extension.js | |
// Browser Extension API Abstraction | |
// The MIT License | |
// Copyright (c) 2010 swdyh | |
function Extension() { | |
this.listeners = {} | |
var that = this | |
var callback = function(message) { | |
if (message && message.name && that.listeners[message.name]) { | |
that.listeners[message.name](message.data) |