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/local/bin/ruby | |
# ruby numerals.rb 1234 | |
# => twelve hundred thirty-four | |
class Num2Eng | |
# 数字と英語を結びつける | |
NUM_ENG = {'0' => 'zero', | |
'1' => 'one', | |
'2' => 'two', | |
'3' => 'three', |
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 bash | |
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
tmux bind-key T run-shell "$CURRENT_DIR/scripts/tmux_list_plugins.sh" |
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
"============================ | |
" neobundle.vim {{{ | |
"============================ | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#begin(expand('~/.vim/bundle/')) |
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
#====================================== | |
# default config | |
#====================================== | |
# default shell | |
set-option -g default-shell /bin/zsh | |
# available pbpaste/pbcopy (Require install ChrisJhonsen/tmux-MacOSX-pasteboard) | |
#set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# vi key binding at copy mode | |
set -g mode-keys vi | |
# mouse mode |
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
# lang | |
export LANG=ja_JP.UTF-8 | |
# prompt | |
autoload colors | |
colors | |
PROMPT="%{${fg[green]}%}%/ | |
[%n]%%%{${reset_color}%} " | |
PROMPT2="%{${fg[green]}%}%_>%{${reset_color}%} " | |
SPROMPT="%B%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%}%b " |
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
$ gunzip -c foo.tar.gz | tar xvf - foo/bar.txt foo/baz.txt | |
x foo/bar.txt | |
x foo/baz.txt | |
$ ls foo | |
bar.txt baz.txt |
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
$ mkdir new_project & cd new_project | |
$ bundle init | |
#=> Gemfileのひな形が生成される | |
$ vim Gemfile | |
#=> gem "rspec" を追加する | |
$ bundle install --path vendor/bundle | |
$ bundle exec rspec --init |
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
# Logging auto loading | |
require 'active_support/dependencies.rb' | |
require 'logger' | |
ActiveSupport::Dependencies.logger = Logger.new("#{Rails.root}/log/develpment.log") | |
ActiveSupport::Dependencies.log_activity = true |
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
db.getMongo().setSlaveOk() |
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
# 特定のコレクションのみリストアする | |
mongorestore --db database_name --collection users ~/dump/users.bson |
NewerOlder