Skip to content

Instantly share code, notes, and snippets.

View joeyespo's full-sized avatar

Joe Esposito joeyespo

View GitHub Profile
#!/usr/bin/env bash
set -e # exit when any command fails
# configure apt for postgres-9.3
codename=`lsb_release -cs`
aptlist="deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main"
echo $aptlist | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
@joeyespo
joeyespo / Procfile
Last active August 29, 2015 14:11
Foreman and Honcho port precedence tests
web: python -u app.py
@joeyespo
joeyespo / Procfile
Last active August 29, 2015 14:11
Foreman and Forego port precedence tests
web: python -u app.py
import json
from urllib import urlencode
from flask import Flask, request, jsonify
app = Flask(__name__)
app.debug = True
@joeyespo
joeyespo / type.css
Created July 17, 2015 15:20
Silkscreen Font
@font-face {
font-family: 'MyWebFont';
src: url('silkscreen_normal_macroman/slkscr-webfont.eot'); /* IE9 Compat Modes */
src: url('silkscreen_normal_macroman/slkscr-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('silkscreen_normal_macroman/slkscr-webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('silkscreen_normal_macroman/slkscr-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('silkscreen_normal_macroman/slkscr-webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
@jbarratt
jbarratt / multi_package_ci.py
Created September 13, 2012 19:51
Multi-package local python CI with watchdog
#!/usr/bin/env python
'''
Based on http://ginstrom.com/scribbles/2012/05/10/continuous-integration-in-python-using-watchdog/
Dependencies: ``watchdog`` (pip install watchdog)
Montiors the whole tree for changes.
Check for all changes to any files and test the associated package; we might want to test changes to a pyramid test.ini, say, or a file rename as part of a refactor.
@typehorror
typehorror / name_generator.py
Created November 26, 2012 15:08
I give you a random name generator using the most common american first names (male and female) and last name.
import random
FIRST_NAMES = 'James', 'John', 'Robert', 'Michael', 'William', 'David',
'Richard', 'Charles', 'Joseph', 'Thomas', 'Christopher', 'Daniel', 'Paul',
'Mark', 'Donald', 'George', 'Kenneth', 'Steven', 'Edward', 'Brian',
'Ronald', 'Anthony', 'Kevin', 'Jason', 'Matthew', 'Gary', 'Timothy',
'Jose', 'Larry', 'Jeffrey', 'Frank', 'Scott', 'Eric', 'Stephen', 'Andrew',
'Raymond', 'Gregory', 'Joshua', 'Jerry', 'Dennis', 'Walter', 'Patrick',
'Peter', 'Harold', 'Douglas', 'Henry', 'Carl', 'Arthur', 'Ryan', 'Roger',
'Joe', 'Juan', 'Jack', 'Albert', 'Jonathan', 'Justin', 'Terry', 'Gerald',
@cyril-sf
cyril-sf / gist:515085e856f9dac2f06a
Last active November 13, 2015 22:29
Polymorphic hasMany w/ FixtureAdapter
var User = DS.Model.extend({
messages: DS.hasMany('message', {polymorphic: true})
});
var Message = DS.Model.extend({
user: DS.belongsTo('user'),
body: DS.attr()
});
var Post = Message.extend({
@chadwhitacre
chadwhitacre / gittip-yc-application.md
Last active December 24, 2015 01:19
Gittip's YC Application (W14).
### Keybase proof
I hereby claim:
* I am joeyespo on github.
* I am joeyespo (https://keybase.io/joeyespo) on keybase.
* I have a public key whose fingerprint is 22EB 13A9 C8CE E5A5 77A7 8AF2 657E 9678 83E5 2DB5
To claim this, I am signing this object: