Skip to content

Instantly share code, notes, and snippets.

View akayj's full-sized avatar
:octocat:

Jian Yu akayj

:octocat:
  • Shanghai, China
  • 12:21 (UTC +08:00)
View GitHub Profile
@akayj
akayj / server.py
Created April 27, 2016 17:19 — forked from martijnvermaat/server.py
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.
"""
@akayj
akayj / 0_reuse_code.js
Last active August 29, 2015 14:06
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