Skip to content

Instantly share code, notes, and snippets.

View hhua's full-sized avatar

Han Hua hhua

  • GV
  • Bay Area
View GitHub Profile
@hhua
hhua / web_basics
Created October 13, 2012 18:19
HTML & CSS For total beginners
## Editor
* BBEdit - http://www.barebones.com/products/bbedit/index.html?utm_source=thedeck&utm_medium=banner&utm_campaign=bbedit
* Sublime2 -
## Web basics
* HTML Intro - http://www.w3schools.com/html/default.asp
* CSS Intro - http://www.w3schools.com/css/default.asp
@hhua
hhua / web_starter
Created October 27, 2012 03:07
Quick Start for web beginner
* Sublime Text 2 - http://www.sublimetext.com/(writing code)
* Zen Coding - http://code.google.com/p/zen-coding/(writing code faster)
* CSS Reset - http://meyerweb.com/eric/tools/css/reset/(dealing with cross-browser chaos)
* Google Web Fonts - http://www.google.com/webfonts(typography)
* 0to255 - http://0to255.com/(color shades)
* SubtlePatterns - http://subtlepatterns.com/(textures)
* Placehold.it - http://www.placehold.it/(image placeholders)
* CSS3 Please - http://css3please.com/(CSS3 syntax)
* GitHub - https://github.com/(version control and hosting)
<html>
<head></head>
<body>
<iframe id="player" width="" height="" src="http://player.vimeo.com/video/62207569?api=1&player_id=player" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>
<script>
var player = $f('player'); // You should pass player id, which is 'player'
player.api('ready', function() {
@hhua
hhua / pr.md
Created November 13, 2013 21:03 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@hhua
hhua / fork.html
Last active January 4, 2016 04:59
Day 1
<!DOCTYPE html>
<html>
<head>
<title>Learning</title>
</head>
<body>
<a href="http://www.google.com">google</a>
<!-- start of header -->
<h1>Hello</h1>
<!DOCTYPE html>
<html>
<head>
<title>Learning</title>
</head>
<body>
<a href="http://www.google.com">google</a>
<!-- start of header -->
<h1>Hello</h1>
@hhua
hhua / foo.html
Created February 4, 2014 04:37
CSS Study 1
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="text">
<span class="block">Hello World</span>
<p id="second-text" class="block">Hello World</p>
<p id="third-text" class="block">Hello World</p>
<p class="image">Hello World</p>
@hhua
hhua / foo.html
Created February 24, 2014 02:06
Advanced CSS
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box box-round"></div>
<div class="box box_shadow"></div>
<div class="box box_gradient"></div>
<div class="box box_rgba"></div>
<div class="box box_rotate"></div>
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
// maybe show an action sheet with more options
[self.tableView setEditing:NO];
}];
moreAction.backgroundColor = [UIColor lightGrayColor];
UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
[self.tableView setEditing:NO];
}];