Skip to content

Instantly share code, notes, and snippets.

Chang chhuang

Block or report user

Report or block chhuang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chhuang
chhuang / css.md
Last active Sep 16, 2016
CSS fundamentals
View css.md

CSS Formatting

  • Use soft tabs (2 spaces) for indentation
  • Do not use ID selectors
  • Use a mix of Single-Line and Multi-Line for CSS properties
  /* If there is only 1 property, use one-liner */
  .footer { background: #fff; }
  
@chhuang
chhuang / front-end-testing.md
Last active Nov 23, 2016
Front end testing ecosystem.
View front-end-testing.md
@chhuang
chhuang / README.md
Created Jul 30, 2016
iTerm2 + Zsh + Antigen
View README.md

1. Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Zsh

brew install zsh
echo "/usr/local/bin/zsh" | sudo tee -a /etc/shells
chsh -s /usr/local/bin/zsh $USER
@chhuang
chhuang / README.md
Created Jul 27, 2016
Show Git history for a specific line in Sublime
View README.md

Don't use blame because git blame only shows the LAST commit of that particular line.

  1. Install sublime-text-git
  2. shift + command + p in Sublime
  3. Type in Custom command
  4. Select Git: Custom Command. It'll open a panel at the bottom of Sublime.
  5. Type in log -L START_LINE_NUMBER,END_LINE_NUMBER:CURRENT_FILE_NAME.EXT

For example: log -L 1,1:index.js will show the git history for line #1 of index.js.

@chhuang
chhuang / react-es5-v-es6.js
Last active Jul 17, 2016
React ES5 v/s ES6
View react-es5-v-es6.js
// 1. require/import
// ES5: require
var React = require('react');
var { Component, PropTypes } = React;
// ES6: import
import React, { Component, PropTypes } from 'react';
// 2. Module import/export
You can’t perform that action at this time.