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 / 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 / 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 / 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 / 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