Skip to content

Instantly share code, notes, and snippets.

View davidrf's full-sized avatar

David Rodriguez Fuentes davidrf

View GitHub Profile
@davidrf
davidrf / best.rb
Last active September 26, 2019 22:36
meow
hello = "world"
puts hello

Lecture Setup

  1. If you don't already have it, install Homebrew,

  2. Install Node and Watchman

$ brew install node
$ brew install watchman

#System Check Review React

##Concepts to Know

  • ReactElements and JSX syntax
  • React Stateless Components
  • React Stateful Components

##Related Articles

  • Introduction To React
  • React Stateless Components

#Atom Shortcuts Shamelessly stolen borrowed from Christina

##Settings

Access settings with cmd + ,.

###Themes

You can change your theme, under the "Theme" tab! I like "Atom Dark" for both UI and Syntax.

@davidrf
davidrf / sinatra_review.md
Last active August 29, 2015 14:27
Sinatra Review Exercise

Create a Sinatra app that records the places to which you have traveled. The app must meet the following requirements:

  • The app should have a places.txt file, which records the name of each place in its own line.
  • Visiting /places shows you a page listing all the places that are in the places.txt file.
  • On the same page, there is a form which takes in the name of a place. Submitting this form sends a POST request to /places.
  • Upon form submission, the name of the place is added to the places.txt file, and the page is updated to include the submitted place in the list of places.
  • Submitting a blank form does not modify the places.txt file.
@davidrf
davidrf / Extra AR exercises - Association
Last active August 29, 2015 14:23
More exercises for AR associations
For this exercise, you're going to draw the ER diagram for a dog only veterinary website. You will not write any code. You will need a pencil and paper. Each table should be drawn as a square and it should have the title of the table, the column names of foreign keys if there are any, and the Active Record association it needs if any. Don't go overboard with adding additional columns, for example in a real app having a users address, state, city, telephone, and other contact information might be good to have, but for this exercise a first and last name column would suffice.
Keep in mind some basic concepts:
* If table A has a foreign key, it will need a belongs to association. i.e. a video game table will have a foreign id that is 'gamer_id' and it will need a 'belongs_to :gamer' association.
* Associations come in pairs, objects in table A belong to objects in Table B, then Table B needs to have a has_one/has_many association. i.e. a video game belongs to a person, and a person has many video games
* Associ