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
/.bundle | |
/vendor/bundle | |
/.envrc |
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
[ | |
{ | |
"name": "results", | |
"type": "RECORD", | |
"mode": "REPEATED", | |
"fields": [ | |
{ | |
"name": "alternatives", | |
"type": "RECORD", | |
"mode": "REPEATED", |
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
// RtAudio exsample - Sine Wave (440Hz) | |
#include <math.h> | |
#include <RtAudio/RtAudio.h> | |
#if defined(__cplusplus) | |
extern "C" { | |
#endif |
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
source "https://rubygems.org" | |
gem "google-api-client", "0.8.3" |
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 "json" | |
require "yaml" | |
def type(value, key) | |
case value | |
when Float | |
"FLOAT" | |
when Integer | |
"INTEGER" | |
when String |
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
68,69c68,69 | |
< CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/include $(DEFS) ${cppflags} $(INCFLAGS) | |
< LDFLAGS = $(CFLAGS) -L. -fstack-protector -L/usr/local/lib | |
--- | |
> CPPFLAGS = -Idummy/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) ${cppflags} $(INCFLAGS) | |
> LDFLAGS = $(CFLAGS) -L. -fstack-protector | |
76c76 | |
< DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/lib $(XLDFLAGS) $(ARCH_FLAG) | |
--- | |
> DLDFLAGS = $(XLDFLAGS) $(ARCH_FLAG) |
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
module M | |
refine(Fixnum) do | |
def foo | |
:foo | |
end | |
end | |
end | |
using M | |
p([0].map{|i| i.foo}) |
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
function echo_and_exec() { | |
echo $* | |
$* | |
ST=$? | |
if [ $ST -ne 0 ]; | |
then | |
echo "エラー: exitstatus: ${ST}" | |
return 1 | |
fi | |
} |
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
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb | |
index 25a4608..fcf89bf 100644 | |
--- a/test/ruby/test_fiber.rb | |
+++ b/test/ruby/test_fiber.rb | |
@@ -52,6 +52,7 @@ class TestFiber < Test::Unit::TestCase | |
(1..100).map{|ti| | |
Thread.new{ | |
max.times{|i| | |
+IO.select([$stdin], nil, nil, 0) # print "" でも可。Thread.pass ではタイムアウト | |
Fiber.new{ |
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 | |
module Svn | |
class Revision | |
def initialize(str) | |
unless /r(\d+) \| (\S+) \| (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \S+)/ =~ str | |
raise "unrecognized svn log message #{str}" | |
end | |
@revision = Regexp.last_match(1) | |
@developer = Regexp.last_match(2) |