Skip to content

Instantly share code, notes, and snippets.

View ayumin's full-sized avatar

Ayumu AIZAWA ayumin

View GitHub Profile
@ayumin
ayumin / ruby-core-development.md
Created October 13, 2012 13:23
Setting for Ruby-core developemnt

Setting

git clone git://github.com/ruby/ruby.git
cd ruby
git svn init -s --prefix=origin/ svn+ssh://svn@ci.ruby-lang.org/ruby
git svn fetch

Configure option

--desable-shared

class Hash
def deep_clone
Marshal.load(Marshal.dump(self))
end
end
h = {} #=> {}
a = {'a' => 1, 'b' => 2, 'c' => h} #=> {"a"=>1, "b"=>2, "c"=>{}}
a1 = a.clone #=> {"a"=>1, "b"=>2, "c"=>{}}
a2 = a.deep_clone #=> {"a"=>1, "b"=>2, "c"=>{}}
@ayumin
ayumin / lokka-installer.sh
Created November 10, 2012 17:28
lokka installer
#!/usr/bin/env bash
git clone git://github.com/komagata/lokka.git
cd lokka
heroku create
git push heroku master
heroku addons:add heroku-postgresql:dev
heroku pg:info | head -n1 | awk '{print $2}' | xargs heroku pg:promote
heroku run rake db:setup
@ayumin
ayumin / segv-global_variables_spec.md
Created October 14, 2012 18:33
./spec/rubyspec/core/kernel/global_variables_spec.rb がSEGVする件

not be reproduced

./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec ./spec/rubyspec/core/kernel/global_variables_spec.rb

reproduced

./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec
ruby 2.0.0dev (2012-10-14 trunk 37179) [x86_64-darwin12.2.0]

..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

@ayumin
ayumin / issue6550
Created July 1, 2012 13:59
Bug #6550 - ruby-trunk
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
6550.rb:5: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
-- Control frame information -----------------------------------------------
c:2434 p:0015 s:8509 b:7295 l:0006a8 d:007294 LAMBDA 6550.rb:5
c:2433 p:---- s:7291 b:7291 l:007290 d:007290 FINISH
c:2432 p:0015 s:7289 b:7289 l:0006a8 d:007288 LAMBDA 6550.rb:5
c:2431 p:---- s:7285 b:7285 l:007284 d:007284 FINISH
c:2430 p:0015 s:7283 b:7283 l:0006a8 d:007282 LAMBDA 6550.rb:5
@ayumin
ayumin / HerokuTutorial.md
Created May 3, 2012 11:26
2012-05-03に実施したHerokuチュートリアル

2012-05-03 Ikezawa

heroku

HerokuアプリケーションはDynoごとに分割された環境で実行される。 Dynoの種類(プロセスタイプ)はProcfileで定義される。

web: bundle exec thin -p $PORT -e $RACK_ENV start
clock: clockwork likes.rb
@ayumin
ayumin / build_ruby.sh
Created April 30, 2012 14:44
Ruby compile option (Mac OSX)
#!/usr/bin/sh
make realclean
autoconf
./configure --prefix=~/tmp/ruby-trunk \
--with-gcc=gcc-4.2 \
--with-arch=x86_64 \
--with-readline-dir=/usr/local \
@ayumin
ayumin / git-dojo.md
Created March 2, 2012 10:59
Git道場実行委員募集

Git道場実行委員募集

3月下旬~4月くらいにGit道場を開催したいと思います。

講義メインではなくてなるべく手を動かす時間をたくさんとり、参加者全員が”怖がらずにmerge/rebaseをできるようになる”というのが目標です。

このイベントに実行委員として参加してくれる方は、下記の形式のメールを送信してください。

To: git-dojo_at_qwik.jp

Cc: ayumu.aizawa_at_gmail.com

@ayumin
ayumin / gist:1574959
Created January 7, 2012 14:59
r34225 ruby build failer on Darwin Kernel Version 10.8.0
configure: WARNING: unrecognized options: --with-readline-dir, --with-openssl-dir, --with-gdbm-dir, --with-libyaml-dir
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
@ayumin
ayumin / patch.diff
Created September 26, 2011 17:29
[psych] test_yamldbm.rb failures/warnings on Win7/Arch
--- test/psych/test_yamldbm.rb
+++ test/psych/test_yamldbm.rb
@@ -1,19 +1,28 @@
# -*- coding: UTF-8 -*-
require 'test/unit'
require 'yaml/dbm'
+require 'tmpdir'
Psych::DBM = YAML::DBM unless defined?(Psych::DBM)
module Psych