Skip to content

Instantly share code, notes, and snippets.

View harryworld's full-sized avatar
🏠
Working from home

Harry Ng harryworld

🏠
Working from home
  • Hong Kong
View GitHub Profile
@harryworld
harryworld / practice_teach.md
Created February 12, 2014 14:47
Practice Teach on Blocks, Procs and Lambda. It layouts the flow of the practice teach I am doing in New York.

#Objective

###What are Blocks, Procs and Lambda?

  • Explain the differences between them
  • Ability to perform an action on each element of array using at least two methods

###Quick Review on Loops and Arrays

  • Loops
@harryworld
harryworld / deploy.rb
Created May 17, 2014 05:13
Discourse Installation Guide fo GA Alumni Website (ga-alumni.com)
# -*- encoding : utf-8 -*-
# config/deploy.rb
require 'capistrano/ext/multistage'
require "rvm/capistrano"
require 'bundler/capistrano' #Using bundler with Capistrano
require 'cape'
set :stages, %w(staging production)
set :default_stage, "production"
@harryworld
harryworld / forms.txt
Created June 8, 2014 04:49
Learn HTML
You'll need to explain how to set up simple and complex HTML forms, including the following elements:
<form>
<button>
<fieldset>
<form>
<input>
<label>
<legend>
<meter>
@harryworld
harryworld / function.md
Last active August 29, 2015 14:02
FUNCTION vs RETURN vs SCOPE

Summary

Generally speaking, a function is a "subprogram" that can be called by code external (or internal in the case of recursion) to the function. Like the program itself, a function is composed of a sequence of statements called the function body. Values can be passed to a function, and the function can return a value.

4 essential parts of Function:

1. function name

The same as a variable name
@harryworld
harryworld / for_quiz.md
Created September 29, 2014 08:43
Learn different languages
languages = ['CoffeeScript', 'JavaScript', 'Ruby', 'Python']

learn(languages)
Expected Result:

> CoffeeScript is CS
@harryworld
harryworld / array_function.md
Created October 1, 2014 03:15
Arrays and Functions
  1. Define a function that takes an array with numbers and prints all the elements of the array, separated by "--"
printSpecial([12, 33, 144, 122])
# 12 -- 33 -- 144 -- 122
  1. Define a function that takes an array with numbers and returns another array where each element contains double each element in the array

Review for Phase 1

Node.js

  • Node Package Manager (npm)
  • http-server
  • CoffeeScript

jQuery

@harryworld
harryworld / get_post.md
Created October 21, 2014 02:59
Using http methods in Rails
  • What method should I use?
<form action="/search" method="">
  <input type="text" name="p" value="">
  <input type="submit">
</form>
  • What method should I use?
@harryworld
harryworld / bdd.md
Last active August 29, 2015 14:08
BDD 5-min quiz
  1. What kinds of tests can we do in general?
User Acceptance Test
Integration Test
Unit Test
Stress Test
Profiling