This file contains hidden or 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
$ cat /etc/lsb-release | |
DISTRIB_ID=Ubuntu | |
DISTRIB_RELEASE=12.04 | |
DISTRIB_CODENAME=precise | |
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS" | |
# Lua | |
$ sudo apt-get install lua5.2 liblua5.2-dev | |
# Vim |
This file contains hidden or 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
# RubyGemsのインストール | |
$ cd ~/misc | |
$ wget http://production.cf.rubygems.org/rubygems/rubygems-2.1.7.tgz | |
$ tar zxf rubygems-2.1.7.tgz | |
$ cd rubygems-2.1.7 | |
$ ~/ruby-2.0.0-p247/bin/ruby setup.rb --prefix=$HOME/rubygems | |
# gemコマンドも~/ruby-2.0.0-p247/binに入るのでPATHを通しておくと良い | |
# BundlerのインストールとtDiary依存ライブラリのインストール |
This file contains hidden or 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
# Rubyの取得・展開 | |
$ wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2 | |
$ bunzip2 ruby-2.0.0-p0.tar.bz2 | |
$ tar xf ruby-2.0.0-p0.tar | |
# Rubyのコンパイル・インストール(強制終了した時は再度makeして再開) | |
$ ./configure --prefix=$HOME/ruby-2.0.0-p0 --disable-install-doc --disable-install-rdoc | |
$ make | |
$ make install |
This file contains hidden or 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
# Pythonのインストール | |
$ wget 'http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2' | |
$ tar jxf Python-2.7.3.tar.bz2 | |
$ cd Python-2.7.3 | |
$ ./configure --prefix=$HOME/local | |
$ make | |
$ make install | |
# distribute + pipのインストール | |
$ wget 'http://python-distribute.org/distribute_setup.py' |
This file contains hidden or 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
# Vim本体の取得 | |
$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | |
$ bunzip2 vim-7.3.tar.bz | |
$ tar xf vim-7.3.tar | |
# 最新のパッチを取得 | |
$ cd vim73 | |
$ mkdir patches | |
$ cd patches | |
$ curl -O 'http://ftp.nluug.nl/vim/patches/7.3/7.3.[001-861]' |
This file contains hidden or 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: https://github.com/raimon49/dotfiles/commit/db8b6eabff74c81d7548c68cbfdd4aafe6a62af3 | |
$ git rm --cached .vim/neobundle.vim.git | |
$ git add .gitignore .gitmodules .vimrc install_cui.sh | |
$ git commit | |
$ cd ~ | |
$ find . -maxdepth 1 -type l -print | xargs rm | |
$ find local/bin -maxdepth 1 -type l -print | xargs rm | |
$ cd ~/works/git |
This file contains hidden or 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
$ egrep "^(Bundle|NeoBundle)" ~/.vimrc | wc -l |
This file contains hidden or 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
// $(elem).on('type', 'selector', handler)が$(elem).delegate('selector', 'type', handler)と同等 | |
// 各td要素にaddEventListener相当の処理が実行される | |
$('table td').on('click', function(e) { | |
// td要素に対する処理 | |
$(this).css('color', 'red'); | |
}) | |
// 親のtable要素だけにaddEventListenerしておき処理を委譲してもらう | |
$('table').on('click', 'td', function(e) { |
This file contains hidden or 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
var cache = {}; | |
function getFromCacheOrAPI(url) { | |
if (!cache[url]) { | |
cache[url] = $.get(url); | |
} | |
return cache[url]; | |
} | |
getFromCacheOrAPI('/api/foo').done(function(data) { |
This file contains hidden or 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 apt-get install zlib1g-dev libicu-dev gettext libcurl4-openssl-dev |