Skip to content

Instantly share code, notes, and snippets.

@honktang
honktang / nginx.conf
Created August 20, 2012 08:22
Custom Domain for Dropbox Public Directory
server{
listen 80;
server_name xxx.com;
location / {
set $index index.html;
rewrite ^.*\/$ $fastcgi_script_name$index last;
proxy_pass http://dl.dropbox.com/u/xxxxxxxx/;
proxy_redirect off;
@honktang
honktang / 1. local
Created August 7, 2012 08:33
Make localhost as web server
#local
ssh -NfR 8080:localhost:80 user@honktang.com
@honktang
honktang / rAF.js
Created April 16, 2012 08:19 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {