Skip to content

Instantly share code, notes, and snippets.

@jkaihsu
jkaihsu / guest_list.csv
Last active December 21, 2015 05:39
Automate Adding People to the Guestlist
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
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = '[email protected]'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }

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:

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

JavaScript CodeAcademy

Date: May 8, 2013


1. Intro to Javascript

confirm("I understand the terms")
@jkaihsu
jkaihsu / debugger.md
Last active December 17, 2015 02:48
@jkaihsu
jkaihsu / css.md
Last active December 17, 2020 03:17

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

JavaScript CodeSchool


Objects

Create a new object

var toilet = new Object();

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"]] 

ActiveRecord Notes


Queries

Create

> User.create(:name => 'jkai', :movie => 'gone with the wind')