Skip to content

Instantly share code, notes, and snippets.

View akayj's full-sized avatar
:octocat:

Jian Yu akayj

:octocat:
  • Shanghai, China
  • 22:35 (UTC +08:00)
View GitHub Profile
@martijnvermaat
martijnvermaat / server.py
Created February 5, 2016 17:43
SimpleHTTPServer with history API fallback
#!/usr/bin/env python
"""
Modification of `python -m SimpleHTTPServer` with a fallback to /index.html
on requests for non-existing files.
This is useful when serving a static single page application using the HTML5
history API.
"""
@am0c
am0c / snowyfog.9.js
Created December 18, 2011 15:32
Google: Let it snow
(function () {
var g = void 0,
k = !0,
m = null,
o = !1,
p, q = this,
r = function (a) {
var b = typeof a;
if ("object" == b) if (a) {
if (a instanceof Array) return "array";