Skip to content

Instantly share code, notes, and snippets.

@koyachi
koyachi / gist:2872722
Created June 5, 2012 04:51
CWDの写真をandroid端末(emulator)に転送
ls | grep -e "jpe*g" -i | xargs -I P1 adb -e push P1 /sdcard/DCIM/100ANDRO/
@koyachi
koyachi / test.coffee
Created May 29, 2012 00:42
hubot-scripts-for-trac/_tmp/test.coffee
# tests for hubot-scripts-for-trac
#
# 2012-05-29 koyachi
trac = require '../scripts/trac'
matched = 0
dummyRobot = {
hear: (re, f) ->
if matched == 1
return
@koyachi
koyachi / frame__aachan.bvh.png
Created April 1, 2012 06:13
http://perfume-dev.github.com/ から得られるBVHの数値を適当に色にした
frame__aachan.bvh.png
@koyachi
koyachi / gist:1992610
Created March 7, 2012 11:20
先頭/末尾にrubyってつくgemの数を数えた
# 結果: /^ruby-.*/が多い
# 参考: http://kyow.cocolog-nifty.com/blog/2010/12/rubygems-d629.html
#
% gem list -r | grep -e "^ruby-" | wc -l
341
% gem list -r | grep -e "^ruby_" | wc -l
73
% gem list -r | grep -e ".*_ruby (" | wc -l
31
% gem list -r | grep -e ".*-ruby (" | wc -l
require 'coreaudio'
dev = CoreAudio.default_output_device
buf = dev.output_loop(44000)
line = ARGV[0]
puts line
44000.times do |t|
# buf[i] = 0x3FFF * rand()
# via
# - http://www.fraction.jp/log/archives/2008/01/10/extract_mp3_from_flv_for_Ruby
# - http://sourceforge.net/projects/jtoothpaste/
# - http://jdownloader.org
module Flv2mp3
class ::IO
def read_ui24
("\000" + self.read(3)).unpack('N')[0]
end
@koyachi
koyachi / gist:1080224
Created July 13, 2011 12:40
coffeescriptからjsにどういう風に変換されるか.coffeeと.js左右に並べながら確認するときに使ったelisp
(setq revert-without-query '("\\.js"))
(global-set-key "\C-c\C-r" 'revert-buffer)
@koyachi
koyachi / vagrant_create_centos_base_vm.org
Created May 18, 2011 12:09
Vagrantで使うCentOSベースVM作ってなんかする