Skip to content

Instantly share code, notes, and snippets.

💭
hungry

Rachel Warbelow rwarbelow

💭
hungry
Block or report user

Report or block rwarbelow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rwarbelow
rwarbelow / running_app_in_production_locally.markdown
Created Nov 11, 2015
How to Run a Rails App in Production Locally
View running_app_in_production_locally.markdown
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.

Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.

@rwarbelow
rwarbelow / mod_0_session_4_practice_tasks.md
Last active Oct 10, 2019
Mod 0 Session 4 Practice Tasks
View mod_0_session_4_practice_tasks.md

Session 4 Practice Tasks

The assignments listed here should take you between 1.5 and 2 total hours.

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
@rwarbelow
rwarbelow / seed_pg_database_using_node_and_sequelize_elastic_beanstalk.md
Last active Sep 10, 2019
Seeding a PG database using Sequelize, Node, and Elastic Beanstalk
View seed_pg_database_using_node_and_sequelize_elastic_beanstalk.md
  1. SSH into your EC2 instance: $ ssh -i <NameofKeyPair>.pem ec2-user@123.123.123.123
  2. $ cd /var/app/current
  3. ./node_modules/.bin/sequelize db:seed:all --env production --url postgres://[username]:[password]@[host]:[databaseport]/[databasename]

For example: ./node_modules/.bin/sequelize db:seed:all --env production --url postgres://taskmanager:taskmanager@taskmanager.ca1ksgalbb7j.us-east-1.rds.amazonaws.com:5432/taskmanager

View gist:2639de952d5cc4e862662d04dfef2a64
Object: Pink Nalgene
Attributes:
Color: "Pink"
LidType: "Twist top"
...
Methods:
CalculatePercentFull: 800 / 1000 = .8
View filename.txt
Class: Bottle
Attributes:
Color (string)
LidType (string)
TotalCapacity (integer)
Stickers (array)
CurrentCapacity (integer)
Recyclable (boolean)
@rwarbelow
rwarbelow / cfu_crud_in_sinatra.markdown
Created Dec 1, 2015
CRUD in Sinatra -- Check for Understanding
View cfu_crud_in_sinatra.markdown
  1. Define CRUD.
  2. There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.
  3. Why do we use set method_override: true?
  4. Explain the difference between value and name in this line: <input type='text' name='task[title]' value="<%= @task.title %>"/>.
  5. What are params? Where do they come from?
View setting_expectations.markdown

Setting Group Expectations

Group Member Names:

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?

  2. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained?

  3. Which feature(s) does each group member want to work on? Which feature(s) does each group member not want to work on?

@rwarbelow
rwarbelow / mod_0_markdown_practice.md
Last active Apr 15, 2019
Mod 0 Markdown Practice
View mod_0_markdown_practice.md

Markdown Practice

Take a look at the Mod 0 Tech Setup instructions. Next, click the Raw button and compare the raw markdown to how the gist displays.

Look for the following elements, and under each bullet point, paste an example of the markdown that creates each.

  • Headings of various sizes
  • Links
  • Bold text
  • Auto-numbered lists
@rwarbelow
rwarbelow / mod_0_setup.md
Last active Mar 24, 2019
Turing School Module 0 Technical Setup Instructions
View mod_0_setup.md

Mod 0 Tech Setup

Complete the following steps before Mod 0 in order to get the tools you'll need on your machine. In this setup, we'll go over the following topics:

  1. New to Mac?
  2. Installing a Text Editor
  3. Installing Xcode
  4. Installing Homebrew
  5. Installing Git
  6. Configuring Git
@rwarbelow
rwarbelow / command_prompt.md
Last active Jan 27, 2019
Changing Your Command Prompt
View command_prompt.md

First, make sure you're at the home directory by typing cd.

Next, type nano .bash_profile. Copy and paste this into the window:

# get current branch in git repo
function parse_git_branch() {
  BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
  if [ ! "${BRANCH}" == "" ]
  then
You can’t perform that action at this time.