Skip to content

Instantly share code, notes, and snippets.

View jdoiwork's full-sized avatar
🏠
Working from home

Junichiro Doi jdoiwork

🏠
Working from home
View GitHub Profile
@letsspeak
letsspeak / gist:5650158
Last active December 17, 2015 17:59
set up yesod on ec2 Amazon Linux AMI 2013.03.1 64bit to make haskell-platform switch to small instance (m1.small) temporarily.
# sudo su
// install apache
# yum -y install httpd
// install develop tools for installing ghc
# yum -y install gcc
// install ghc 7.4.2
# wget http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-unknown-linux.tar.bz2
@rjattrill
rjattrill / dsnless-odbc-sequel.rb
Created December 5, 2012 22:53
DSN-less ODBC Connection with ruby-sequel
require 'sequel'
DB = Sequel.connect(:adapter=>'odbc',:driver=>'SQL Server Native Client 10.0',:server=>'localhost',:port=>1433, :uid=>'myuser',:pwd=>'mypass',:db_type=>'mssql')
DB.fetch("SELECT * FROM artist") do |row|
puts row
end
@kwatch
kwatch / gist:2814940
Created May 27, 2012 16:18
Rubyの特殊変数一覧
$! raise された例外オブジェクト
$" require で読み込まれたファイルの配列
$#
$$ 現在のプロセス ID
$%
$& 正規表現にマッチした箇所の文字列
$' 正規表現にマッチした箇所より後ろの文字列
$(
$)
$* Ruby スクリプトに指定された引数。ARGV と同じ