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
# -*- coding: utf-8 -*- | |
# | |
# Usage | |
# | |
# rails new yourapp -m https://raw.github.com/gist/1178242/3c77cfffeb99f32d19333de986ff41283aa9eb26/rails_template_for_3.1.rb -T --skip-bundle | |
# | |
git :init | |
append_file '.gitignore', <<-END |
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
# -*- coding: utf-8 -*- | |
class Array | |
def point(x, y) | |
self[y][x] | |
end | |
def set_point(x, y, char) | |
self[y][x] = char | |
self |
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
click = (id) -> | |
element = document.getElementById('card' + id) | |
myevent = document.createEvent('MouseEvents') | |
myevent.initEvent('click', false, true) | |
element.dispatchEvent(myevent) | |
element | |
size = $('.card').size() - 1 | |
ary = new Array(size) |
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 | |
# -*- coding: utf-8 -*- | |
input =<<EOS | |
100 | |
2 | |
10 11 | |
3 | |
0 9 9 | |
4 |
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
==> Downloading http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4 | |
File already downloaded and cached to /Users/maeshima/Library/Caches/Homebrew | |
==> ./configure -prefix /usr/local/Cellar/qt/4.7.3 -system-libpng -system-zlib - | |
==> make | |
cd src/tools/bootstrap/ && make -f Makefile | |
/usr/bin/c++ -c -O3 -w -pipe -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../mkspecs/macx-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -o .obj/release-static/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp | |
/usr/bin/c++ -c -O3 -w -pipe -fvisibility=hidden - |
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
sudo yum install emacs git zsh gcc make readline readline-devel libyaml libyaml-devel zlib zlib-devel openssl openssl-devel | |
mkdir src | |
cd src | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz | |
tar zxvf ruby-1.9.3-p0.tar.gz | |
cd ruby-1.9.3-p0 | |
./configure | |
make | |
sudo make install | |
cd /home/ec2-user/src/ruby-1.9.3-p0/ext/openssl |
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
sudo yum install mysql mysql-server mysql-devel | |
sudo cp /etc/my.cnf /etc/my.cnf.orig | |
wget https://raw.github.com/willnet/config/master/my.cnf.ec2-micro | |
sudo mv my.cnf.ec2-micro /etc/my.cnf | |
sudo mysql_install_db | |
sudo mysqld_safe --defaults-file=/etc/my.cnf --user=mysql & | |
mysql -u root | |
TRUNCATE TABLE mysql.user; | |
FLUSH PRIVILEGES; | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'xxxxxxxx' WITH GRANT OPTION; |
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
sudo yum install gcc-c++ | |
wget http://nodejs.org/dist/v0.6.9/node-v0.6.9.tar.gz | |
tar zxvf node-v0.6.9.tar.gz | |
cd node-v0.6.9 | |
./configure | |
make | |
sudo make install |
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
sudo yum install libcurl-devel | |
wget http://nginx.org/download/nginx-1.0.11.tar.gz | |
tar zxvf nginx-1.0.11.tar.gz | |
sudo /usr/local/bin/gem install passenger | |
cd /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/bin | |
sudo env PATH=/usr/local/bin:$PATH ./passenger-install-nginx-module |
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
# http://download.savannah.gnu.org/releases/freetype/ から最新のfreetypeをダウンロード | |
tar zxvf freetype-x.x.x | |
cd freetype | |
./configure | |
make | |
sudo make install | |
curl -O http://www.swfmill.org/releases/swfmill-0.3.2.tar.gz | |
tar zxvf swfmill-0.3.2.tar.gz | |
cd swfmill-0.3.2 |