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
| outdated = `port outdated`.split("¥n") | |
| if /No installed ports are outdated./ =~ outdated[0] | |
| puts outdated[0] | |
| exit 0 | |
| end | |
| unless /The following installed ports are outdated:/ =~ outdated[0] | |
| $stderr.puts "port outdated failed, maybe..." | |
| $stderr.puts *outdated | |
| exit 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
| # -*- coding: utf-8 -*- | |
| # Termtter plugins for EUC-JP terminal. | |
| # | |
| require "kconv" | |
| module ::Readline | |
| class << self | |
| alias :readline_old :readline | |
| 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
| 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 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 "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 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
| 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 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
| // RtAudio exsample - Sine Wave (440Hz) | |
| #include <math.h> | |
| #include <RtAudio/RtAudio.h> | |
| #if defined(__cplusplus) | |
| extern "C" { | |
| #endif |
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
| 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 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
| 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 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 "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 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
| 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 |
OlderNewer