Skip to content

Instantly share code, notes, and snippets.

Ayumu AIZAWA ayumin

Block or report user

Report or block ayumin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ayumin
ayumin / HerokuCustomerSuccessArchitectJP.md
Last active Jun 29, 2016
[求人] Heroku Customer Solutions Architectを募集しています!
View HerokuCustomerSuccessArchitectJP.md

Heroku Customer Solutions Architect の正式なJob Descriptionsはこちらです。直接ご応募される方はリンク先のページ下部にある「Apply」ボタンをクリックして必要項目の入力に進んでください。

Heroku CSAとは

Herokuのカスタマーソリューションアーキテクトの職務内容についてはリンク先の文書を参照していただければと思いますが、ここでは約4年間このポジション相当の職務をやってきた私自身の経験から、CSAに求められる役割と期待値について書いていきたいと思います。

CSAのミッション

View vim-on-heroku.sh
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
View bugs-ruby-lang.log
2014-01-11T02:23:47.857275+00:00 heroku[router]: at=info method=GET path=/javascripts/application.js?1389338402 host=bugs.ruby-lang.org fwd="24.240.165.101" dyno=web.1 connect=1ms service=5ms status=200 bytes=16823
2014-01-11T02:23:49.223769+00:00 heroku[router]: at=info method=GET path=/projects/1/issues?page=5&sort=id%3Adesc%2Cstatus%2Cassigned_to host=bugs.ruby-lang.org fwd="61.135.189.172" dyno=web.1 connect=2ms service=5ms status=301 bytes=0
2014-01-11T02:24:54.099830+00:00 app[web.1]: Started GET "/projects/ruby-trunk/repository" for 27.120.225.209 at 2014-01-11 02:24:54 +0000
2014-01-11T02:24:54.104905+00:00 app[web.1]: Processing by RepositoriesController#show as HTML
2014-01-11T02:24:54.104905+00:00 app[web.1]: Parameters: {"id"=>"ruby-trunk"}
2014-01-11T02:24:54.111982+00:00 app[web.1]: Current user: ayumin (id=1075)
2014-01-11T02:24:54.230198+00:00 app[web.1]: svn: E180001: Unable to connect to a repository at URL 'file:///var/svn/repos/ruby/trunk'
2014-01-11T02:24:54.230198+00:00 app[web.1]: s
@ayumin
ayumin / db.task
Created Dec 9, 2013
rake task for enable hstore extension on PostgreSQL
View db.task
namespace :db do
namespace :enable do
desc "enable hstore extension"
task :hstore => [:environment, :load_config] do
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;')
end
end
Rake::Task['db:schema:load'].enhance ['db:enable:hstore']
end
View realclean-broken.patch
$ git diff
diff --git a/common.mk b/common.mk
index ebcf24e..b82c13e 100644
--- a/common.mk
+++ b/common.mk
@@ -449,7 +449,6 @@ clean-local:: PHONY
$(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
$(Q)$(RM) y.tab.c y.output encdb.h transdb.h prelude.c config.log rbconfig.rb $(ruby_pc) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT)
clean-ext:: PHONY
- $(Q)$(RM) $(EXTOUT)/.timestamp/.*.time
@ayumin
ayumin / test-all_error.log
Created May 2, 2013
test-all failed at r40560
View test-all_error.log
$ make test-all TESTS='-j 5'
CC = gcc
LD = ld
LDSHARED = gcc -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=extra-tokens -pipe -arch x86_64
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -pie -arch x86_64
SOLIBS =
Using built-in specs.
View hash_deep_clone.rb
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"=>{}}
View lokka-installer.sh
#!/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 Oct 14, 2012
./spec/rubyspec/core/kernel/global_variables_spec.rb がSEGVする件
View segv-global_variables_spec.md

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 / ruby-core-development.md
Created Oct 13, 2012
Setting for Ruby-core developemnt
View ruby-core-development.md

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
You can’t perform that action at this time.