Skip to content

Instantly share code, notes, and snippets.

View jeremydw's full-sized avatar

Jeremy Weinstein jeremydw

View GitHub Profile
@jeremydw
jeremydw / google-app-engine-environment.textile
Last active April 8, 2018 13:19
Google App Engine Environment Variables (as of Google App Engine/1.8.6, October 2013)
APPENGINE_RUNTIME python27
APPLICATION_ID s~appid
AUTH_DOMAIN gmail.com
CONTENT_LENGTH 148
CONTENT_TYPE application/x-www-form-urlencoded
CURRENT_MODULE_ID default
CURRENT_VERSION_ID appid.370290628632119235
DATACENTER us1
DEFAULT_VERSION_HOSTNAME appid.appspot.com
HTTPS on
@jeremydw
jeremydw / .bash_profile
Last active December 25, 2015 16:09
jeremydw's bash profile
PS1='\[\e[31m\]\W\[\e[0m\]\$ '
alias cbp='cat ~/.bash_profile | pbcopy'
alias g="cd ~/git/macgrow/pygrow/"
alias ge="cd ~/git/macgrow/pygrow/grow/growedit/"
alias gs="cd ~/git/growspace/"
alias gt="cd ~/git"
alias irch='irssi -c irc.housing.berkeley.edu -p 6667'
# /connect -ssl irc.caffeinatedcode.com 6697
@jeremydw
jeremydw / app.yaml
Last active December 26, 2015 19:29
A simple test for Google's Cloud Datastore to see if property name length affects entity size on disk.
application: jeremydw-hrd
version: property-name-length-test
api_version: 1
runtime: python27
threadsafe: true
handlers:
- url: /.*
script: main.application
@jeremydw
jeremydw / fizzbuzz.html
Created October 28, 2013 19:32
FizzBuzz in CSS
<!doctype html>
<title>FizzBuzz in CSS</title>
<meta charset='utf-8'>
<style>
ul {
counter-reset: number;
}
li:before {
counter-increment: number;
content: counter(number);
@jeremydw
jeremydw / update_git_author.sh
Created June 20, 2014 17:41
Changes a user's Git name and email address in a repo's commit history.
#!/bin/sh
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<old name>" ];
then
GIT_COMMITTER_NAME="<new name>";
GIT_AUTHOR_NAME="<new name>";
GIT_COMMITTER_EMAIL="<new email>";
GIT_AUTHOR_EMAIL="<new email>";
git commit-tree "$@";
@jeremydw
jeremydw / gist:2925eba918b0c819d155
Created June 20, 2014 17:46
Send an attachment using mutt from the command line
mutt -a <filename>.txt -s "<subject>" -- <email address>
@jeremydw
jeremydw / .vimrc
Last active July 12, 2016 21:30
.vimrc
autocmd BufWritePre *.py :%s/\s\+$//e
autocmd BufWritePre *.md :%s/\s\+$//e
colorscheme desert
filetype plugin indent on
filetype plugin on
map # :s/^/#/<Return>
map 1 :tabprev<Return>
map 2 :tabnext<Return>
map 3 :s/^#//<Return>
@jeremydw
jeremydw / gist:fab7cd0d1a81e5d33990
Last active August 29, 2015 14:03
Recursive find/replace
find . -type f -name '*.txt' -exec sed -i '' s/this/that/ {} +
@jeremydw
jeremydw / gist:93a8122e2eeec45a6d03
Created July 29, 2014 17:30
Fixing dev_appserver import problems when using the gcloud SDK
ImportError: No module named dev_appserver
>> ln -s $HOME/google-cloud-sdk/platform/google_appengine /usr/local/google_appengine
@jeremydw
jeremydw / app.yaml
Last active August 11, 2017 00:14
ProtoRPC CORS middleware App Engine app
application: protorpc-cors-middleware
version: protorpc-cors-middleware
api_version: 1
runtime: python27
threadsafe: true
libraries:
- name: webapp2
version: latest