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
| package main | |
| // Usage: | |
| // % tail -f a.txt | go run wstail.go | |
| import ( | |
| "code.google.com/p/go.net/websocket" | |
| "fmt" | |
| "io" | |
| "net/http" |
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
| # https://www.ibm.com/developerworks/jp/linux/library/l-pythrd/ | |
| from __future__ import generators; | |
| import time; | |
| threads = [] | |
| TIMES = 100000 | |
| def stringops(): | |
| for n in xrange(TIMES): | |
| s = "Mary had a little lamb" |
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 'logger' | |
| require 'pp' | |
| $log = Logger.new(STDOUT) | |
| $log.level = Logger::DEBUG | |
| class Image | |
| attr_accessor :width, :height, :pixels | |
| def initialize(width, height) |
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
| ls | grep -e "jpe*g" -i | xargs -I P1 adb -e push P1 /sdcard/DCIM/100ANDRO/ |
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
| # tests for hubot-scripts-for-trac | |
| # | |
| # 2012-05-29 koyachi | |
| trac = require '../scripts/trac' | |
| matched = 0 | |
| dummyRobot = { | |
| hear: (re, f) -> | |
| if matched == 1 | |
| return |
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
| # 結果: /^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 |
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 'coreaudio' | |
| dev = CoreAudio.default_output_device | |
| buf = dev.output_loop(44000) | |
| line = ARGV[0] | |
| puts line | |
| 44000.times do |t| | |
| # buf[i] = 0x3FFF * rand() |