Skip to content

Instantly share code, notes, and snippets.

View russomi's full-sized avatar
☁️
Remote

Michael Russo russomi

☁️
Remote
View GitHub Profile
#!/usr/bin/env python
import getpass
import os
import sys
## Application specific
SDK_DIR = '/usr/local/google_appengine'
APP_DIR = '/home/username/src/app'
APPID = 'something-awesome'
@jdennes
jdennes / appengine_console.py
Created June 6, 2010 22:59
An interactive console for App Engine apps
#!/usr/bin/python
# An interactive console for App Engine apps
# Usage: ./appengine_console.py app_id [host]
import code
import getpass
import sys
sys.path.append("/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine")
application: zip-site
version: main
runtime: python
api_version: 1
handlers:
- url: /.*
script: main.py
@jeremi
jeremi / fabfile.py
Created November 4, 2010 21:00
A fabfile to manage git+appengine deployement
from __future__ import with_statement
import functools
import os
import sys
from fabric.api import *
from fabric.colors import green, red, green
import datetime
import re
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@jesseh
jesseh / gist:970832
Created May 13, 2011 16:25
Generate release notes from Git with test expectations using fabric - see http://wp.me/p1ySiS-4
def _get_notes(prev_tag, next_tag):
with hide('stdout'):
commits = run("git log --graph --pretty=format:'%h - %s (%cr by %an)%d' "
+ "--abbrev-commit --date=relative"+ " %s..%s"
% (prev_tag, next_tag)).splitlines()
commits.pop() # prev_tag went out with the previous release notes.
commits.reverse() # order going down with time
commits = "\n".join(commits)
commits = re.sub(r"\\",r"__SUB__", commits)
commits = re.sub(r"/",r"\\", commits)
@rmyers
rmyers / mkappenginevenv.sh
Created June 7, 2011 18:01
Setup virtual env for appengine with python 2.5
#!/bin/bash
#
# Build a virtual environment suitable for running appengine.
# This uses virtualenvwrapper to make the virtual environment.
# Which you can activate with 'workon appengine'
#
# Everyone loves one-liners!
# Mac one-liner:
# $ curl -s https://raw.github.com/gist/1012769 | bash
#
@brainsik
brainsik / dotdict.py
Created June 11, 2011 00:31
Override Python's dict with this for JS style dot notation access :-)
# encoding: utf-8
class DotDict(dict):
def __init__(self, *a, **kw):
dict.__init__(self, *a, **kw)
for key in self:
self._validate_key(key)
def _validate_key(self, key):
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:48
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

@chrisfarms
chrisfarms / console.py
Created August 10, 2011 14:41
An appengine python console
#!/usr/bin/env python
import getopt
import os
import ae
import sys
import code
def usage():
print """