Skip to content

Instantly share code, notes, and snippets.

@jkaihsu
jkaihsu / guest_list.csv
Last active Dec 21, 2015
Automate Adding People to the Guestlist
View guest_list.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
first_name;last_name;email;guests;gender
jkai;hsu
rita;jindawong
fred;tandem
daniella;kaufman
sam;samskies
annie;zhou
jon;oei
christine;hsu
michael;hom
View urbanspoon_reservations.rb
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
View rails_jquery_ajax.md

jQuery and jQuery-ujs

When using Rails 3.0 and later we already get jquery-rails for free. Look in the gemfile and you'll see:

gem "jquery-rails"

You can view the full documentation here: source: https://github.com/indirect/jquery-rails

If you take a look in APP_DIR/app/assets/javascripts/application.js, you'll notice the following lines of code:

View gist:5565371

Suriving Dev Bootcamp


Remember that Hard Work is more important than talent or intelligence.

Greatness is often misattributed to some finite level of ability. People assume others are ahead of them without accounting for the amount of work that person is putting in to achieve their success.

Persistence and Patience

- patience with yourself and persistence with this process. Learning over completion - You just paid over $12,000 to be here. It's not about checking boxes off of a list, it's about learning the material
View JavaScript_codeacademy_notes.md

JavaScript CodeAcademy

Date: May 8, 2013


1. Intro to Javascript

confirm("I understand the terms")
View debugger.md
View css.md

CSS

Basics

Resource: CSS Basics/Basics/111-html-css-css-cascading-style-sheets-360

  1. HTML describes its structures
  2. CSS descrive its presentation

Selector

View JavaScriptCodeSchool.md

JavaScript CodeSchool


Objects

Create a new object

var toilet = new Object();
View ruby_enumerable.md

Create 9 by 9 Array

string = ["E", "Y", "T", "B", "H", "I", "S", "S", "R", "P", "N", "E", "H", "F", "Qu"]
new_array = Array.new(9) {string.shift(9)}

> [["E", "Y", "T", "B"], ["H", "I", "S", "S"], ["R", "P", "N", "E"], ["H", "F", "Qu"]] 

View ActiveRecord_Query_notes.md

ActiveRecord Notes


Queries

Create

> User.create(:name => 'jkai', :movie => 'gone with the wind')
You can’t perform that action at this time.