Skip to content

Instantly share code, notes, and snippets.

@jacroe
jacroe / mustachify.sh
Last active December 27, 2015 20:09
Mustachify a gif Based on an idea from @holman
if [ -z $1 ] || [ ! -f $1 ]
then
echo "Usage: ./cmds [location of gif]"
exit 1
else
output=/tmp/mustache
rm -rf $output
mkdir $output
echo "Extracting gif..."
@pamelafox
pamelafox / views.py
Created September 5, 2011 21:26
CORS on Python/Flask
from flask import request, make_response,
def any_response(data):
ALLOWED = ['http://localhost:8888']
response = make_response(data)
origin = request.headers['Origin']
if origin in ALLOWED:
response.headers['Access-Control-Allow-Origin'] = origin
return response