Skip to content

Instantly share code, notes, and snippets.

View phlco's full-sized avatar

Phillip Lamplugh phlco

  • Los Angeles, CA
View GitHub Profile
@phlco
phlco / Gemfile
Last active August 29, 2015 13:58
testing and development gems
# What about including `pry`, `rspec` or `guard`?
# They're loaded automatically as dependencies
group :development, :test do
# Annotates ActiveRecord Models, routes and others based on the database schema
gem "annotate"
# generates entity relationship diagrams based on Active Record models
# Postscript bugs may be fixed with:
@phlco
phlco / guard_setup.md
Last active August 29, 2015 13:58
guard setup

Setting up Guard with Rspec

Guard watches a directory and runs commands when it sees changes to files.

This is great for automating your rspec tests!

Set up

Add guard and guard-rspec to your Gemfile

@phlco
phlco / pig_latin.md
Created April 3, 2014 13:03
Igpay Atinlay

Morning Exercise

Pig Latin Translater

Implement a Ruby class called Translater with a class method called to_pig that takes a word (string) as an argument and returns its pig latin equivalent. Description of the rules from Wikipedia:

For words that begin with consonant sounds, the initial consonant or consonant cluster is moved to the end of the word, and "ay" is added, as in the following examples:

Step 1

@phlco
phlco / heroku_checklist.md
Last active August 29, 2015 13:58
Heroku Checklist

Heroku Checklist

To enable features such as static asset serving and logging on Heroku please add rails_12factor gem to your Gemfile.

# Gemfile
gem 'rails_12factor', group: :production

You should be running the same version of Ruby on Heroku that you're running locally.

CONTEXT

WHAT USER STORY YOU ARE WORKING ON:

I am working on the user story "User wants to log in."

WHAT YOU ARE TRYING TO DO:

I am trying to have the user update their profile.

@phlco
phlco / rails_app.md
Last active August 29, 2015 13:57
moving rails app into main repo folder

Moving your project up

When you work on a Rails project you want your .git repo to be in the root of your Rails App.

This is very important for hosting your app on Heroku.

Many of you have the following repo structure:

# A project folder, with a rails app inside of it.
@phlco
phlco / raw
Last active August 29, 2015 13:57
{"name": "xavier"}
@phlco
phlco / file1.text
Created March 19, 2014 13:21
Created via API and HTTParty
Demo
@phlco
phlco / file1.text
Created March 19, 2014 13:21
Created via API and HTTParty
Demo
@phlco
phlco / file1.text
Created March 19, 2014 03:35
Created via API and HTTParty
Demo