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 | |
# | |
import os | |
import urllib | |
from google.appengine.ext import blobstore | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import blobstore_handlers | |
from google.appengine.ext.webapp import template |
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
def pixels_per_em(fontsize=12, resolution=72): | |
return fontsize*(resolution/72.0) |
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
SELECT * FROM Object where __key__ = KEY('Object', 1) |
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 json | |
import datetime | |
import time | |
def json_extras(obj): | |
if hasattr(obj, 'utctimetuple'): | |
ms = time.mktime(obj.utctimetuple()) * 1000 | |
ms += getattr(obj, 'microseconds', 0) / 1000 | |
return int(ms) | |
return None |
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
// Do checks for minimum requirements | |
if (!XMLHttpRequest || !JSON) { | |
throw Error('Browser does not support the minimum requirements of ' + | |
'XMLHttpRequest, JSON' + | |
'. Try adding modernizer to polyfill.'); | |
} | |
function http(method, url, data, success) { | |
var r = new XMLHttpRequest(); | |
r.open(method, url, true); |
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 google.appengine.ext import db | |
from google.appengine.api import memcache, users | |
import logging | |
import functools | |
import datetime, time | |
import sys, os, re | |
sys.path.append(os.path.dirname(os.path.realpath(__file__))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?xml version="1.0" ?> | |
<CorsConfig> | |
<Cors> | |
<Origins> | |
<Origin>*</Origin> | |
</Origins> | |
<Methods> | |
<Method>GET</Method> | |
<Method>HEAD</Method> | |
<Method>OPTIONS</Method> |
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
# iterate through all git repos in projects folder | |
# fetch for any changes to remote | |
# for each branch, if it is different pull the changes and deploy | |
echo "Starting" | |
while true; do | |
for project in $(ls projects); do | |
echo "Checking for updates to $project" | |
cd "projects/$project" | |
branches=$(git remote -v update 2>&1 | grep -oEi "^\W+.*\w+$" | grep -v "up to date" | grep -oEi "\w+$") |
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 | |
# AppEngine Guardfile | |
# More info at https://github.com/lepture/python-livereload | |
from livereload.task import Task | |
from livereload.compiler import shell | |
def recursive_watch(directory, filetypes, *args, **kwargs): | |
import os |
OlderNewer