Skip to content

Instantly share code, notes, and snippets.

vperron /
Created August 17, 2013 10:46 — forked from enjalot/
Added OPTIONS handling, works far better !
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_OPTIONS(self):
self.send_response(200, "ok")
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS')
self.send_header("Access-Control-Allow-Headers", "X-Requested-With")
def send_head(self):
vperron / bower.json
Last active December 26, 2015 04:39 — forked from brcharron/leaflet-google.js
Leaflet Google plugin (with bower.json)
"name": "leaflet-google",
"version": "0.0.1",
"_release": "0.01",
"main": "./leaflet-google.js",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "a7c205f84f8dcc60c8c5ab4ac453930810d39b15"

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

vperron /
Created September 5, 2019 15:23 — forked from lionel-panhaleux/
Python test
#!/usr/bin/env python
# Write a function that determines if any of its arguments evaluates to True.
def test_find_true():
>>> find_true(True, {})
>>> find_true(None, (), 0)