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 werkzeug import Request | |
class HTTPMethodOverrideMiddleware(object): | |
"""Overrides the request method by modifying werkzeug's REQUEST_METHOD environment. | |
Usage: | |
from flask import Flask | |
app = Flask(__name__) | |
app.wsgi_app = HTTPMethodOverrideMiddleware(app.wsgi_app) |
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
# How to generate a secret key with Python | |
# via http://flask.pocoo.org/docs/quickstart/ | |
import os | |
import binascii | |
os.urandom(24) | |
# Out: b'\x83[\x14\xa4s\xde\xdd\xed\xed/\xd0&-\xc6N\xd5\xb7\xf8O\xd5(\xce\xca,' | |
# Or if you want a prettier one: | |
binascii.hexlify(os.urandom(24)) |
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
<?php | |
// Variables used in this script: | |
// $summary - text title of the event | |
// $datestart - the starting date (in seconds since unix epoch) | |
// $dateend - the ending date (in seconds since unix epoch) | |
// $address - the event's address | |
// $uri - the URL of the event (add http://) | |
// $description - text description of the event | |
// $filename - the name of this file for saving (e.g. my-event-name.ics) | |
// |
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
#!/bin/sh -ex | |
inhouseserver="http://inhouse.xxx.com/upload" | |
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer | |
projectpath=$1 | |
scheme=$2 | |
projectname=$(basename "${projectpath}") |