Sublime: Go to Preferences -> Settings -> More -> Syntax Specific -> User. This should open a settings window named Ruby.sublime-settings
{
"tab_size": 2,
"translate_tabs_to_spaces": true
"detect_indentation": false
}
| development: | |
| adapter: postgresql | |
| encoding: unicode | |
| database: myflix_dev | |
| pool: 5 | |
| username: falon | |
| password: 3141-5926-5359 | |
| test: | |
| adapter: postgresql |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#rc() | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'tpope/vim-unimpaired' | |
| Plugin 'tpope/vim-repeat' | |
| Plugin 'flazz/vim-colorschemes' |
| class Robot | |
| attr_reader :directions | |
| def initialize | |
| @directions = [:north, :east, :south, :west] | |
| end | |
| def orient(direction) | |
| if invalid_direction? direction | |
| raise ArgumentError |
| require 'io/console' | |
| def read_char | |
| STDIN.echo = false | |
| STDIN.raw! | |
| input = STDIN.getc.chr | |
| if input == "\e" then | |
| input << STDIN.read_nonblock(3) rescue nil | |
| input << STDIN.read_nonblock(2) rescue nil |
| def calculate_total(cards) | |
| array = cards.map {|e| e[1]} | |
| total = 0 | |
| array.each do |value| | |
| if value == "Ace" | |
| total += 11 | |
| elsif value == "Jack" || value == "Queen" || value == "King" | |
| total += 10 | |
| else |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
| echo "deb http://packages.elastic.co/elasticsearch/1.7/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list | |
| sudo apt-get update && sudo apt-get install elasticsearch | |
| sudo update-rc.d elasticsearch defaults 95 10 | |
| sudo service elasticsearch start | |
| curl http://localhost:9200 |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#rc() | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'tpope/vim-unimpaired' | |
| Plugin 'tpope/vim-repeat' | |
| Plugin 'flazz/vim-colorschemes' |
Sublime: Go to Preferences -> Settings -> More -> Syntax Specific -> User. This should open a settings window named Ruby.sublime-settings
{
"tab_size": 2,
"translate_tabs_to_spaces": true
"detect_indentation": false
}
| What is the first number? | |
| 3 | |
| What is the second number? | |
| 3 | |
| 1) Add | |
| 2) Subtract | |
| 3) Multiply | |
| 4) Divide | |
| f | |
| Please enter a number from 1 through 4 |