Skip to content

Instantly share code, notes, and snippets.

View julsfelic's full-sized avatar

Julian Feliciano julsfelic

View GitHub Profile

Testing external services with VCR

Why would you want to test an external service (API)?

  • Talk about how API's can change suddenly
  • How VCR can help catch regressions
  • Peace of mind that you are hiting the correct endpoints

Setting up VCR in your Rails project

  • Cloning down the repo
  • Seupt (Gemfile, rails_helper, etc...)
@julsfelic
julsfelic / intermediate_sql.md
Last active March 25, 2016 13:29
Intermediate SQL

What is an INNER JOIN?

An INNER JOIN combines two tables with matches. Any values that do not have a match are not returned.

What is a LEFT OUTER JOIN?

A LEFT OUTER JOIN will return all rows from the left table, regardless if there is a matching row in the right table. For the values that do not have a matching row on the right table, null is returned. Any rows in the right table that do not have a match are not returned.

What is a RIGHT OUTER JOIN?

A RIGHT OUTER JOIN will return all rows from the right table, regardless if there is a matching row in the left table.

@julsfelic
julsfelic / pivot_dtr.md
Last active March 22, 2016 04:46
Pivot DTR

The Pivot

Julian, Heidi, July & Jerrod

  • What does each group member hope to get out of the project? What are your goals and expectations for the project?
  • Julian - Some awesome JS functionality and jumping into browfield project
  • Jerrod - JavaScript stuff. Working on soft skills.
  • Heidi - Push myself with JavaScript. Solid 4's with good work habits. Stay organized.
  • July - Brownfield codebase. Having good workflow. Make something FUN!!! FUN FUN FUN!
  • 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?
  • Julian - Tonight & part of tomrrow I have do get some things done. Besides that open.
@julsfelic
julsfelic / running_app_in_production_locally.markdown
Last active March 2, 2016 17:34 — forked from rwarbelow/running_app_in_production_locally.markdown
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. Add public/assets to your .gitignore

@julsfelic
julsfelic / assert_pipeline_scavenger_hunt.md
Last active March 2, 2016 16:39
Asset Pipeline Scavenger Hunt
  • What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files?

    • To concatenate files is to add files together.
    • Conecating Example.
    • You would conecatenate files to limit the amount of times we make a trip to the server.
  • What does it mean to precompile files? What does this have to do with coffeescript and sass files?

    • Before we send a file to the browser, we have to precompile it to a language that the browser can handle (HTML, CSS & JS).
    • If we are using a language that makes it easier to program in a certain language like Coffeescript, Sass or ERB, we have to first precompile it before serving it up to the browser.
  • What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files?

Setting Group Expectations

Group Member Names: Julian, Alexis, Scott & Admir

  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?
  • Scott: Weekends (Not too early on weekends)
  • Julian: Pretty much open at all times
  • Alex: M,W,F 4-6pm (Workout). Stay till 9-10pm normally. Saturday (Early morning chores) Sunday (past Mid-afternoon)
  • Admir: W (2:30 - 3:00 pm)
@julsfelic
julsfelic / my_favorite_beer.md
Created February 25, 2016 19:34
My Favorite Beer (Tentative title)

Project: My Favorite Beer (Tentative title)

An app that allows users to choose their favorite breweries in America! You can sort brewery's by their state (or maybe city) and add them to your personal list! Users can see all their favorited breweries, see an individual breweries information, remove a brewery from their personal list. They cannot add, edit or delete a brewery. Admins can add, edit or delete breweries along with creating categories for the breweries.

Categories (brewery specialty)

  • breweries belong to a category
  • categories can be created and destroyed by a logged-in admin user
@julsfelic
julsfelic / github_shortcuts.md
Created February 25, 2016 16:56
Github shortcuts

Github Shortcuts

Sitewide

Question Mark (?)

The ? gives you all the keyboard shortcuts that are available for the current page.

Go to your notifications

@julsfelic
julsfelic / git_rule_of_thumbs.md
Last active February 25, 2016 16:38
Git rule of thumbs for proper commit messages

The seven rules of a great commit messaage

  1. Seperate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how
@julsfelic
julsfelic / gist:70a1d970c2bfbd63588f
Last active February 17, 2016 19:58
"Migrations, Databases, Models, and Relationships in Rails

One-to-one Relationship Example

A person belongs to one Fitbit and a Fitbit belongs to one person.

One-to-many Relationship Example

A article of clothing belongs to a person and a person has many articles of clothing.

Many-to-many Relationship