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
##earthquake.gem plugin | |
##pinned item open like LDR | |
Earthquake.init do | |
once do | |
@pinned = [] | |
end | |
command :pin do |m| | |
@pinned << m[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
import com.softsynth.jsyn.* | |
//groovy script for phone call | |
class DualToneMultiFrequency{ | |
def num | |
def buf | |
SineOscillator high | |
SineOscillator low | |
AddUnit mixer | |
LineOut out |
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
# -*- coding: utf-8 -*- | |
%w(eventmachine osc-ruby uri readline).each{|x| require x} | |
server = 'localhost' | |
port = 12345 | |
uri = '/puts' | |
prompt = "> " | |
client = OSC::Client.new server, port | |
puts %q{ |
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 fs = require('fs'); | |
var request = require('request'); | |
request({uri:'http://k.yimg.jp/images/top/sp/logo.gif'}).pipe(fs.createWriteStream('logo.gif')); |
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
(define init-qc-window | |
(lambda () | |
(objc:make "NSWindow" | |
"initWithContentRect:styleMask:backing:defer:" | |
(list 0 0 640 480) | |
1 2 0))) | |
(define create-qcview | |
(lambda (file) | |
(let ((qcv (objc:make "QCView" "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
;;require pc-class | |
(define create-basic-coltrane-matrix | |
(lambda (n) | |
(let ((ns (map (lambda (i) (pc:chord i '^)) '(0 8 4)))) | |
(map (lambda (i) (map (lambda (j) (+ j n)) i)) ns)))) | |
(create-basic-coltrane-matrix 60) ;; => ((60 64 67) (68 60 63) (64 68 71)) |
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
(define *canvas* (gfx:make-canvas 703 452)) | |
(define *code-image-size* (gfx:get-image-size (gfx:get-code-image))) | |
(gfx:set-canvas-size *canvas* (car *code-image-size*) (cdr *code-image-size*)) | |
(define *layer1* (gfx:make-image (car *code-image-size*) (cdr *code-image-size*))) | |
(define *log-img* (gfx:make-image (car *code-image-size*) (cdr *code-image-size*))) | |
(define *log-font* "CoolveticaRg-Regular") | |
(define *log-font-size* 14.0) | |
(define *log-text-style* (gfx:make-text-style *log-font* *log-font-size*)) |
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
(define *canvas* (gfx:make-canvas 640 480)) | |
(define *log-img* (gfx:make-image 640 480)) | |
(define *log-font* "CoolveticaRg-Regular") | |
(define *log-font-size* 14.0) | |
(define *log-text-style* (gfx:make-text-style *log-font* *log-font-size*)) | |
(gfx:start-live-video) | |
(define camera-image-loop | |
(lambda (time) |
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 util = require('util'); | |
var events = require('events'); | |
var request = require('request'); //https://github.com/mikeal/request | |
var Wordnet = function(words){ | |
this.ret = []; | |
this.words = words; | |
this.url = "http://nymnym.heroku.com/word/"; | |
events.EventEmitter.call(this); | |
}; |
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(open-uri json MeCab).each{|x| require x} | |
Earthquake.init do | |
command :jap do |m| | |
tw = "" | |
txt = MeCab::Tagger.new('-O wakati').parse(m[1]).force_encoding(Encoding::UTF_8).split(" ") | |
txt.each do |w| | |
open("http://nymnym.heroku.com/word/"+URI.encode(w)) do |r| | |
print "." |