This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |