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
| # デフォでコメントアウトされてるの外すだけ | |
| Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f } | |
| RSpec.configure do |config| | |
| config.include WaitFor | |
| end |
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
| Hoge.first.try(:name) | |
| # => メソッドや変数の呼び出しで、objがnilでも例外を発生させずに通れる |
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
| set -g prefix C-t | |
| unbind C-b | |
| set -sg escape-time 0 | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| bind C-h select-pane -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
| window.onload = function() { | |
| var canvas = document.createElement('canvas'); | |
| canvas.width = 640; | |
| canvas.height = 480; | |
| document.body.appendChild(canvas); | |
| var context = canvas.getContext('2d'); | |
| var player = Object(); | |
| var obstacles = [Object(), Object(), Object()]; |
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
| vi | |
| brew install 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
| sudo yum -y update | |
| sudo yum -y git openssl-devel make vim gcc cmake readline-devel zlib-devel | |
| git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
| git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo -e 'export PATH="$HOME/.rbenv/bin:$PATH"\neval "$(rbenv init -)"' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| CONFIGURE_OPTS="--disable-install-rdoc" rbenv install 2.5.1 | |
| rbenv global 2.5.1 | |
| gem install bundler --no-ri --no-rdoc | |
| rbenv rehash |
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
| #add_area | |
| = link_to '+', '', id: 'plus' | |
| javascript: | |
| $(function(){ | |
| $(document).on('click', '#plus', function(){ | |
| $('#add_area').append('<div class="col-sm-10"><input type="text" class="form-control" /></div>') | |
| return false; | |
| }); | |
| }); |
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
| gem 'therubyracer' | |
| gem 'less-rails' | |
| gem 'twitter-bootstrap-rails' | |
| # rails g bootstrap:install | |
| gem 'bootstrap-sass' | |
| gem 'sass-rails' | |
| # application.css -> application.scss |
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
| PATH="$HOME/homebrew/bin:$PATH" | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| # rails | |
| export PATH="$HOME/.rbenv/bin:$PATH" | |
| eval "$(rbenv init -)" |
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
| # use utf-8 japanese | |
| export LANG=ja_JP.UTF-8 | |
| # emacs key binding | |
| bindkey -e | |
| # history | |
| HISTFILE=~/.zsh_history | |
| HISTSIZE=1000000 | |
| SAVEHIST=1000000 |
NewerOlder