| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| # A sample Gemfile | |
| source "https://rubygems.org" | |
| gem 'rspec' | |
| gem 'pry' | |
| gem 'fastercsv' |
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
| def bubblesort(arr) | |
| start_time = Time.now | |
| swapped = true | |
| puts "Bubblesort takes in #{arr} and spits out: " | |
| while swapped | |
| swapped = false | |
| for i in 0..(arr.length-2) # avoids looking past array boundary | |
| currentNum = arr[i].to_i | |
| nextNum = arr[i+1].to_i |
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
| vagrant [vagrant]> pry | |
| [1] pry(main)> def say_hi(name) | |
| [1] pry(main)* puts "Hi, #{name}" | |
| [1] pry(main)* end | |
| => nil | |
| [2] pry(main)> say_hi("Chris") | |
| Hi, Chris | |
| => nil | |
| [3] pry(main)> money = 12.33 | |
| => 12.33 |