Skip to content

Instantly share code, notes, and snippets.

View rwarbelow's full-sized avatar
💭
hungry

Rachel Warbelow rwarbelow

💭
hungry
  • Guild Education
  • Denver, CO
View GitHub Profile
@rwarbelow
rwarbelow / running_app_in_production_locally.markdown
Created November 11, 2015 18:26
How to Run a Rails App in Production Locally
  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 / command_prompt.md
Last active June 2, 2023 04:21
Changing Your Command Prompt

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
@rwarbelow
rwarbelow / mod_0_session_4_practice_tasks.md
Last active June 15, 2022 10:25
Mod 0 Session 4 Practice Tasks

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.
Class: Bottle
Attributes:
Color (string)
LidType (string)
TotalCapacity (integer)
Stickers (array)
CurrentCapacity (integer)
Recyclable (boolean)
@rwarbelow
rwarbelow / cfu_crud_in_sinatra.markdown
Created December 1, 2015 18:00
CRUD in Sinatra -- Check for Understanding
  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?
@rwarbelow
rwarbelow / seed_pg_database_using_node_and_sequelize_elastic_beanstalk.md
Last active September 10, 2019 06:11
Seeding a PG database using Sequelize, Node, and Elastic Beanstalk
  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

Object: Pink Nalgene
Attributes:
Color: "Pink"
LidType: "Twist top"
...
Methods:
CalculatePercentFull: 800 / 1000 = .8
@rwarbelow
rwarbelow / setting_expectations.markdown
Last active July 22, 2019 21:10
Setting Expectations

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 April 15, 2019 16:36
Mod 0 Markdown Practice

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 March 24, 2019 16:32
Turing School Module 0 Technical Setup Instructions

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