This file contains 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
set nocompatible | |
set noerrorbells | |
set backup | |
set backupdir=.backup,~/.vimbackup | |
set keywordprg=man | |
"set number | |
set ruler | |
set showmode | |
set showmatch | |
set ignorecase |
This file contains 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 "irb/completion" | |
require "irb/ext/save-history" | |
IRB.conf[:SAVE_HISTORY] = 500 | |
IRB.conf[:HISTORY_FILE] = ENV['HOME']+'/.irb_history' | |
if ENV["TS_SERVER"] | |
begin | |
require "drb" | |
require "rinda/rinda" |
This file contains 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
defescape ^Tt | |
escape ^Tt | |
bind ' ' windowlist -b | |
bind l windowlist -b | |
bind ^l windowlist -b | |
bind o focus | |
bind ^O focus | |
bind O focus up |
This file contains 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
Index: insns.def | |
=================================================================== | |
--- insns.def (revision 24573) | |
+++ insns.def (working copy) | |
@@ -1945,6 +1945,39 @@ | |
/** | |
@c optimize | |
+ @e optimized size | |
+ @j 最適化された recv.size()。 |
This file contains 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
CC = gcc | |
CFLAGS = -I/Applications/Pd-extended.app/Contents/Resources/include \ | |
-fPIC | |
LDSHARED = $(CC) -dynamic -bundle -undefined suppress -flat_namespace | |
PD_DYLIB_EXT=pd_darwin | |
SRC = helloworld.c | |
OBJ = ${SRC:.c=.o} |
This file contains 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 "wavefile" | |
class Oscilator | |
def initialize(opt={}) | |
@freq = opt[:freq] || 440.0 | |
@sample_rate = opt[:sample_rate] || 44100 | |
@delta_time = 1.0 / @sample_rate | |
# k/M (k = strength of spring, M = mass of object) => @k | |
@k = (2.0*Math::PI*@freq)**2 |
This file contains 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
def ieee754_double(num) | |
int64 = [num].pack("d").unpack("Q")[0] | |
sign = (int64 & (1 << 63)) == 0 ? 1 : -1 | |
exp = (int64 & 0x7ff0000000000000) >> 52 | |
frac = (int64 & 0x000fffffffffffff) | |
if exp == 0 and frac == 0 | |
return sign * 0.0 | |
end |
This file contains 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 | |
"AAAAAAA AAAAAA | |
AggIA/B+ICAA AAIIFAIIQR | |
BAAAACCCICCEEIgAAAA/hBA/B+B | |
wAAAAII/4IAQAIAAAACCQBCAEACAA | |
AAAgkAQgBAAgAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAD/Bwfx/yBPwIQQgIIECB | |
AgSCFEEIECBAgQIEgSIiD+AgfwECB | |
IFBIggQIEIBA/yBfxwICCBBAQIE |
This file contains 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
# encoding: utf-8 | |
# | |
require "narray" | |
require "png" | |
def read_pgm(filepath) | |
open(filepath) do |io| | |
raise "#{filepath}: only P5(Graymap rawbits) is supported" unless io.gets == "P5\n" | |
width, height = io.gets.split(/\s+/).map{|i| i.to_i } |
This file contains 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
# -*- encoding: utf-8 -*- | |
# AO render benchmark (GCD version for MacRuby 0.6) | |
# Original program (C) Syoyo Fujita in Javascript (and other languages) | |
# http://lucille.atso-net.jp/blog/?p=642 | |
# http://lucille.atso-net.jp/blog/?p=711 | |
# Ruby(yarv2llvm) version by Hideki Miura | |
# http://github.com/miura1729/yarv2llvm/blob/a888d8ce6855e70b630a8673d4cfe075a8e44f0e/sample/ao-render.rb | |
# Modified by Tomoyuki Chikanaga | |
# |