Skip to content

Instantly share code, notes, and snippets.

Glen Chiacchieri Glench

Block or report user

Report or block Glench

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Glench
Glench / ubuntu-setup.md
Created Apr 2, 2012 — forked from jmondo/ubuntu-setup.md
Setting up Rails server environment on Ubuntu 11.10
View ubuntu-setup.md

Setting up Rails server environment on Ubuntu 11.10

Including Rails, Passenger, RVM, Ruby 1.9.3, SSH keys, Postgres and a test app

Instructions

  • This is tested on a clean install of Ubuntu 11.10 server (with SSH root access), though it should work on whatever install you have now.
  • Replace LOGIN with your ubuntu username
  • Replace SERVER_ADDRESS with the IP address of your server
@Glench
Glench / include_raw.py
Created Jun 15, 2012
Better Django include_raw, for escaping included files in templates
View include_raw.py
# To make this work, put this file in the templatetags directory of your app
# (make it if it doesn't exist, and make sure to add a blank __init__.py file
# if it doesn't already exist). Then from your template call
# {% load include_raw %} {% include_raw 'some_template' %}
from django import template
from django.conf import settings
from django.template.loaders.app_directories import load_template_source
register = template.Library()
@Glench
Glench / state_adjacency.py
Created Oct 17, 2012
State adjacency in python
View state_adjacency.py
# for use with http://writeonly.wordpress.com/2009/03/20/adjacency-list-of-states-of-the-united-states-us/
import csv
import json
from pprint import pprint
with open('states.csv', 'rb') as csvfile:
state_reader = csv.reader(csvfile)
adjacency_dict = {}
for row in state_reader:
adjacency_dict[row[0]] = [state for state in row[1:]]
@Glench
Glench / adjacent_us_states.json
Created Oct 17, 2012
JSON US State Adjacency List
View adjacent_us_states.json
{
"WA": [
"ID",
"OR"
],
"DE": [
"MD",
"PA",
"NJ"
],
@Glench
Glench / former_quarterbacks.txt
Last active Dec 11, 2015
all past quarterbacks
View former_quarterbacks.txt
Abbott, Faye
Adams, Tony
Adkins, Sam
Aikman, Troy
Ainge, Erik
Albert, Frankie
Allard, Don
Allen, Ermal
Allen, Jared
Anderson, Billy
@Glench
Glench / former_quarterbacks_naive_countries.txt
Last active Dec 11, 2015
naive rhyme matching of former quarterbacks to countries, just matches last few letters
View former_quarterbacks_naive_countries.txt
Jordan, Homer : ['jordan']
Testaverde, Vinny : ['cape verde']
Riordan, Tim : ['jordan']
Germaine, Joe : ['ukraine']
Lamonica, Daryle : ['dominica']
O'Hara, Pat : ['western sahara']
Dorsey, Ken : ['jersey']
Verica, Marc : ['costa rica', 'south africa']
Froman, Adam : ['oman']
Humphries, Stan : ['french southern territories']
@Glench
Glench / current_quarterbacks.txt
Last active Dec 11, 2015
current quarterbacks
View current_quarterbacks.txt
Anderson, Derek
Archer, R.J.
Bartel, Richard
Batch, Charlie
Beck, John
Bethel-Thompson, McLeod
Blanchard, Matt
Bradford, Sam
Brady, Tom
Brandstater, Tom
@Glench
Glench / all_countries.txt
Created Jan 16, 2013
a decent list of countries
View all_countries.txt
Ascension Island
Andorra
United Arab Emirates
Afghanistan
Antigua and Barbuda
Anguillaal
Albania
Armenia
Netherlands Antilles
Angola
@Glench
Glench / all_quarterbacks_naive_countries.txt
Created Jan 16, 2013
a naive matching of countries to all quarterbacks including current ones
View all_quarterbacks_naive_countries.txt
Jordan, Homer : ['jordan']
Testaverde, Vinny : ['cape verde']
Riordan, Tim : ['jordan']
Germaine, Joe : ['ukraine']
Lamonica, Daryle : ['dominica']
O'Hara, Pat : ['western sahara']
Dorsey, Ken : ['jersey']
Verica, Marc : ['costa rica', 'south africa']
Froman, Adam : ['oman']
Humphries, Stan : ['french southern territories']
@Glench
Glench / all_quarterbacks_naive_countries_last3letters.txt
Created Jan 16, 2013
a naive matching of all quarterbacks to countries this time using only the last 3 letters
View all_quarterbacks_naive_countries_last3letters.txt
Aikman, Troy : ['isle of man', 'oman']
Davis, Bob : ['saint kitts and nevis']
Boeckman, Todd : ['isle of man', 'oman']
Hilger, Rusty : ['niger']
Bomar, Rhett : ['myanmar']
Lamonica, Daryle : ['antarctica', 'costa rica', 'dominica', 'jamaica', 'south africa']
Jaynes, David : ['philippines', 'saint vincent and the grenadines']
Davis, Nate : ['saint kitts and nevis']
Roethlisberger, Ben : ['niger']
Long, Chuck : ['hong kong']
You can’t perform that action at this time.