Skip to content

Instantly share code, notes, and snippets.

View vanderhoop's full-sized avatar

Travis Vander Hoop vanderhoop

View GitHub Profile
#Gemfile
group :development, :test do
gem 'pry-rails' # Causes rails console to open pry
# https://github.com/rweng/pry-rails
gem 'pry-debugger' # Adds step, next, finish, and continue commands and breakpoints
# https://github.com/nixme/pry-debugger
gem 'pry-stack_explorer' # Navigate the call-stack
# https://github.com/pry/pry-stack_explorer
gem 'annotate' # Annotate all your models, tests, fixtures, and factories
# https://github.com/ctran/annotate_models
development:
adapter: postgresql
encoding: unicode
database: <%= File.basename(Rails.root) %>_development
pool: 5
host: localhost
username: <%= ENV['PG_USERNAME'] %>
password:
test:
pushing a project to heroku:
***if you're pushing to heroku you must add the following to config/application.rb, WITHIN the Application class:
config.assets.initialize_on_precompile = false
1. heroku create (git remote -v shows we have remotes on heroku)
***if you used an environmental variable, heroku won't be able to access it, and you will have to tell heroku what the environmental variable and value are via the following line of code in the terminal:
***heroku config:set GITHUB_USERNAME=joesmith

GA_Logo

##JavaScript Sample Lesson (15 minutes)

####Student Learning Objectives:

  1. Be able to explain what a function is and why/when you would use one.
  2. Be able to define a function with a single argument and a return value.

####You Can Assume Students Already Know:

Ubuntu Installfest

  1. [HipChat][hipchat]
  • Google Chrome
    • sudo apt-get install libxss1
    • wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    • sudo dpkg -i google-chrome*.deb
  • Install Ruby + Rails (Be sure to read the below instructions before going to the linked guide.)
    • In the linked guide when you get to generating you SSH key, as you're generating the key it requests a location to create the files, use the example the prompt provides. *If you create a psscode when generating the key, you will be prompted for the passcode when testing the connection.
[user]
name = github_name
email = github_email
[color]
ui = always
[core]
editor = subl -w
excludesfile = ~/.gitignore_global
[commit]
template = ~/.gitmessage.txt
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
{
"hot_exit": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"default_line_ending": "LF",
"ensure_newline_at_eof_on_save": true,
"font_face": "Courier New",
"font_size": 18.0,
"highlight_line": true,
"remember_open_files": false,
"scroll_past_end": true,
# _ _ __ _ _
# | |__ __ _ ___| |__ _ __ _ __ ___ / _(_) | ___
# | '_ \ / _` / __| '_ \ | '_ \| '__/ _ \| |_| | |/ _ \
# | |_) | (_| \__ \ | | | | |_) | | | (_) | _| | | __/
# |_.__/ \__,_|___/_| |_| | .__/|_| \___/|_| |_|_|\___|
# |_|
# When Bash starts, it executes the commands in this script
# http://en.wikipedia.org/wiki/Bash_(Unix_shell)
#
# Written by Philip Lamplugh, Instructor General Assembly (2013)

Schema Exercise

Partner up, and on your whiteboard tables, write out schema declarations for Animals and Employees, discussing what datatype and contraints best suit each attribute. Once you feel confident in your schemas, type them up in a .sql file and add it to your wdi database.

Animals Schema

Design a schema such that each animal has the following attributes:

  • species
  • sex