Skip to content

Instantly share code, notes, and snippets.

View pretty git history
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
AllencxWang /
Created Mar 10, 2018 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
AllencxWang / jsnote.js
Created Sep 27, 2017 — forked from Louis0723/jsnote.js
View jsnote.js
str1 = "中文";
obj = {
get a(){return '1';},
set b(value){this.c = value;},
class Cls{
if (typeof('function')
AllencxWang /
Created Sep 29, 2016 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)