Skip to content

Instantly share code, notes, and snippets.

Avatar

Allison Parrish aparrish

View GitHub Profile
@acdha
acdha / simple_cors_server.py
Last active Oct 3, 2020
Python 3: serve the current directory as HTTP while setting CORS headers for XHR debugging
View simple_cors_server.py
#!/usr/bin/env python3
# encoding: utf-8
"""Use instead of `python3 -m http.server` when you need CORS"""
from http.server import HTTPServer, SimpleHTTPRequestHandler
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
@mcleonard
mcleonard / vector.py
Last active Oct 12, 2020
A vector class in pure python.
View vector.py
"""
The MIT License (MIT)
Copyright (c) 2015 Mat Leonard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@malarkey
malarkey / Contract Killer 3.md
Last active Oct 20, 2020
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

You can’t perform that action at this time.