Skip to content

Instantly share code, notes, and snippets.

View gnap's full-sized avatar

George Ang gnap

  • zhihu.com
  • Beijing
View GitHub Profile
@gnap
gnap / qloader.js
Last active December 15, 2015 14:39
A module loader from Quora.
this.require || function (global, undefined) {
// The `require` function takes an absolute module identifier and returns
// the `exports` object defined by that module.
function require(moduleId) {
if (!installed[moduleId]) {
log("loader", "required", moduleId);
var exports, module = defines[moduleId];
if (module) {
module.id = moduleId, module.exports = exports = {};
@gnap
gnap / secure_cookie.js
Created March 20, 2013 15:47
tornado cookie signature in node.js
@gnap
gnap / tagshow
Created April 7, 2012 15:18
Tagging TV Show files of mp4 format in given dir(s) for iTunes import
#!/usr/bin/env python
'''
File: tagshow.py
Author: George Ang <gnap.an@gmail.com>
Description:
'''
import os
import sys
import json