Skip to content

Instantly share code, notes, and snippets.

View jeremydw's full-sized avatar

Jeremy Weinstein jeremydw

View GitHub Profile
@jeremydw
jeremydw / Makefile
Last active November 10, 2016 23:49
Continuous staging with Grow
prod_version ?= prod
project ?= PROJECT
staging_version ?= staging
develop:
pip install -t lib grow
grow install
test:
grow build
mogrify -resize 1400x -extent 1600x1200 -gravity center -background white -alpha remove -quality 65 -format jpg *.png
git config --global push.default current
cp /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so /Users/jeremydw/homebrew/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
{{doc.content_from_page1.foo}}
@jeremydw
jeremydw / main.py
Created July 18, 2016 18:43
App Engine Users API auth middleware for WSGI apps
from google.appengine.api import users
ALLOWED_DOMAINS = [
'example1.com',
'example2.com',
]
class AuthMiddleware(object):
@jeremydw
jeremydw / base.html
Last active June 25, 2016 02:07
Grow on App Engine
{{inject_google_sheet(doc)}}
git log --since "APR 18 2016" --until "MAY 18 2016" --pretty=format:'- %s'
git log --since "AUG 01 2016" --until "OCT 21 2016" --pretty=format:"%h%x09%an%x09%ad%x09%s" | pbcopy
git log --pretty=format:'- %s'
@jeremydw
jeremydw / app.yaml
Last active September 8, 2017 17:42
Minimal app.yaml for static builds – also handles index.html serving
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /(.*\..*)
static_files: build/\1
upload: build/(.*\..*)
secure: always
- url: /(.+)/
pkill node
nohup npm start --production &
git config core.fileMode false
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim