Skip to content

Instantly share code, notes, and snippets.

View geocodinglife's full-sized avatar
👨‍💻
Keep Coding

Ricardo Alarcon geocodinglife

👨‍💻
Keep Coding
  • remote
View GitHub Profile
puts 'hello world'

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@geocodinglife
geocodinglife / math.rb
Last active October 27, 2015 19:08
simple math
g = -> (f, x) { f.call(x, 3) }
h = -> (x, y) { x + y }
g.call(h, 5)
>>8
#same as this
geo = -> (zombi, gasparin) { zombi.call(gasparin, 3) }
jose = -> (gasparin, frankenstein) { gasparin + frankenstein }
geo.call(jose, 5)
>> 8