Skip to content

Instantly share code, notes, and snippets.

View zhangchiqing's full-sized avatar

Leo Zhang zhangchiqing

  • Flow Foundation
  • Vancouver, Canada
View GitHub Profile
@zhangchiqing
zhangchiqing / easing.js
Last active August 29, 2015 14:08 — forked from gre/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@zhangchiqing
zhangchiqing / 0_reuse_code.js
Created August 22, 2014 13:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zhangchiqing
zhangchiqing / bulb.css
Created April 26, 2014 05:15
visible/hidden css pattern
// bulb is invisible without power
.bulb,
.bulb-inline,
.bulb-inline-block {
display: none;
}
// bulb is visible with power
.power .bulb { display: block; }
.power .bulb-inline { display: inline; }