Skip to content

Instantly share code, notes, and snippets.

@gohan-999
gohan-999 / .bash_profile
Last active August 29, 2015 14:12
phpenv+php-build環境によるphpバージョン管理~Mac(Yosemite)編~ ref: http://qiita.com/omega999/items/c5b1c177331f8d342efd
#rbenv
export RBENV_ROOT="/usr/local/rbenv"
PATH="$RBENV_ROOT/bin:$PATH"
#phpenv
export PHPENV_ROOT="/usr/local/phpenv"
PATH="$PATH:$PHPENV_ROOT/bin"
export PATH
eval "$(rbenv init -)"
@gohan-999
gohan-999 / scrape.rb
Created December 24, 2014 12:44
みんな大好きIGRの時刻表をスクレイピング ref: http://qiita.com/omega999/items/fa3748523a8f6d7178d1
# URLにアクセスするためのライブラリの読み込み
require 'open-uri'
# Nokogiriライブラリの読み込み
require 'nokogiri'
# スクレイピング先のURL(青山駅の例)
url = 'http://www.igr.jp/wp/timetable/aoyama'
charset = nil
@gohan-999
gohan-999 / bash
Created December 4, 2014 11:41
homebrewとは何者か。仕組みについて調べてみた ref: http://qiita.com/omega999/items/6f65217b81ad3fffe7e6
$ brew --config
@gohan-999
gohan-999 / bash
Created November 5, 2014 05:39
Nodeの導入が上手くいかない ref: http://qiita.com/omega999/items/ba8af81df59875874513
$ node -v
v0.10.32
@gohan-999
gohan-999 / vim
Created October 22, 2014 05:26
vimで設定可能な色の種類を一覧で確認する方法 ref: http://qiita.com/omega999/items/15031eece4256eb500e7
:so $VIMRUNTIME/syntax/hitest.vim
@gohan-999
gohan-999 / .tmux.conf
Last active May 13, 2016 07:53
tmuxでvimのcolorscheme(というか.tmux.conf)が反映されない場合の対処法 ref: http://qiita.com/omega999/items/c1ff60ac60b093c8676c
set -g terminal-overrides 'xterm:colors=256'
@gohan-999
gohan-999 / .vimrc
Created October 15, 2014 15:10
vimで文字が削除出来ないと思ったらバックスペースが効かなくなった ref: http://qiita.com/omega999/items/23aec6a7f6d6735d033f
set backspace=indent,eol,start
@gohan-999
gohan-999 / 入力コマンド
Last active August 29, 2015 14:07
Railsでnokogiriのインストールが出来ない ref: http://qiita.com/omega999/items/cd0420aae064cfddc725
bundle config build.nokogiri --use-system-libraries
bind -x '"\C-r":peco-history'
@gohan-999
gohan-999 / .bashrc
Created October 11, 2014 09:07
cdによるディレクトリ移動を効率化 ref: http://qiita.com/omega999/items/4346ae57c9ff8bb1d50d
# カレントディレクトリの中にあるディレクトリを番号指定で移動するcd listの定義
function cdl {
local -a dirlist opt_f=false
local i d num=0 dirnum opt opt_f
while getopts ":f" opt ; do
case $opt in
f ) opt_f=true ;;
esac
done
shift $(( OPTIND -1 ))