This guide assumes a fresh install of Mac OSX 10.7 Lion.
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
#normal settings.py stuff should go above this comment | |
#if manage.py test was called, use test settings | |
if 'test' in sys.argv: | |
try: | |
from test_settings import * | |
except ImportError: | |
pass |
just change out app_name for your purposes
openssl genrsa 2048 > app_name-wildcard.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key app_name-wildcard.key > app_name-wildcard.cert
# Common Name (eg, your name or your server's hostname) []:*.app_name.com
openssl x509 -noout -fingerprint -text < app_name-wildcard.cert > app_name-wildcard.info
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
import webapp2 | |
import urllib2 | |
import urllib | |
import json | |
## CHANGE THIS | |
CLIENT_ID = "vYPeq7LGf1utg2dbDlGKCwGKgy94lPH0" | |
CLIENT_SECRET = "DLQ5dWkNMwPlUWo2jqVkbG1PFyeMvV60HEJaW0FioeI4ZxGaAW73BiqRBZmRk29v" | |
DOMAIN = "contoso.auth0.com" | |
CALLBACK_URL = "http://localhost:8080/callback" |
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
""" | |
Pseudo-random django secret key generator. | |
- Does print SECRET key to terminal which can be seen as unsafe. | |
""" | |
import string | |
import random | |
from __future__ import print_function |
Moved to repository: https://github.com/Mailcloud/swift-serializer
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import random | |
import string | |
import re | |
from collections import Counter |
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/bash | |
images=$(./stale_image_tags.sh my.repo 3) | |
for image in $images; do | |
docker rmi $image | |
done |
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
var oldXHR = window.XMLHttpRequest; | |
var xhr_errors = 0; | |
var xhr_loads = 0; | |
var xhr_aborts = 0; | |
var xhrStack = {}; | |
var xhr_count = 0; | |
function newXHR() { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
OlderNewer