Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomasz Janowski janaz

View GitHub Profile
@janaz
janaz / cors_server.py
Last active Apr 23, 2016 — forked from enjalot/cors_server.py
Allow CORS with python simple http server
View cors_server.py
import sys
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
path = self.translate_path(self.path)
f = None
if os.path.isdir(path):
if not self.path.endswith('/'):
# redirect browser - doing basically what apache does
self.send_response(301)
View install-mapnik-amazon-ami.sh
# http://aws.amazon.com/amazon-linux-ami/
# http://aws.amazon.com/amazon-linux-ami/faqs/
# Boot up a machine with at least 1.5 to 2 GB Ram
# login
chmod 600 key.pem
ssh -i key.pem ec2-user@ec2...compute.amazonaws.com
# update