Skip to content

Instantly share code, notes, and snippets.

View charliegerard's full-sized avatar
💭
Making something 🧪

Charlie charliegerard

💭
Making something 🧪
View GitHub Profile

#Day33

Morning exercise: https://gist.github.com/mathildathompson/9944082

Metaprogramming Writes methods for you insidea method

Calling debugger pauses the program so we can call functions and check where the errors are.

If we don't want to pause the program to debug, we can define a function inside the function we want to check.

###Licensing

morning exercise: https://gist.github.com/wofockham/0794e05bb675da923c13

Richard Stallman Eric Raymond - The cathedral and the bazaar book

GPL: General Public License - you can do anything but if you distribute it you have to distribute it on the same terms as the owner did. Sub cat : LGPL version 2 and 3.

#Day 21

##Branching

git branch shows the branches your repo already has git checkout -b login -> To go in the branch git branch

git checkout master goes back to main repo git checkout login --> goes back to branch

#Day19

###Steps to create Rails app

  • rails new
  • Update Gemfile and run bundle
  • update database yml
  • rake db:create
  • rails g migration create (table)
  • rails edit migration

#Day 17

rails console is the same thing as pry.

Your terminal shoul have 4 tabs open with shell, server, pry and psql.

"rm -rf folder name" in pry to remove a folder

rake db:drop to remove a database