Skip to content

Instantly share code, notes, and snippets.

View sgammon's full-sized avatar
:shipit:
f*ck it, ship it

Sam Gammon sgammon

:shipit:
f*ck it, ship it
View GitHub Profile

FatCatMap Labs - Development Documentation

##File Directory

  • Collaborating.md - tips and tutorials about how to collaborate on the codebase and not bump elbows with other devs
  • Deployment.md - directions about how to deploy to staging and production infrastructure
  • Installation.md - directions about how to set up a dev environment and fatcatmap dependencies
  • Codebase.md - plain-english description of how the codebase works and interconnects
@sgammon
sgammon / __init__.py
Created June 7, 2011 20:09
Providence/Clarity Init
#
# =====================================================
# |==| PROVIDENCE/CLARITY DATA ANALYSIS PLATFORM |==|
# |==| ----------------------------------- |==|
# |==| Author: Sam Gammon <sg@samgammon.com> |==|
# |==| Version: 0.1 DEV |==|
# |==| ------------------------------------------- |==|
# |==| COPYRIGHT (c) 2010. ALL RIGHTS RESERVED |==|
# =====================================================
#
@sgammon
sgammon / Tyler's Page.html
Created June 17, 2011 00:49
A page for tyler to practice on
<html>
<head>
<title>Tyler's cool page</title>
<meta name='author' value='sam gammon <sg@samgammon.com>' />
<style type='text/css'>
h1
{
@sgammon
sgammon / search.php
Created July 24, 2011 00:39
Hampshire Connect help: search function
<?php
include("mainstyle.php");
include("links.php");
mysql_connect ("localhost", "db","password") or die (mysql_error());
mysql_select_db ("db");
$term = $_POST['term'];
//$sql = mysql_query("SELECT 'firstname','lastname' FROM users WHERE
MATCH('firstname','lastname') AGAINST('%$term%')");
## Input - can be any length
input = 1234567890
## Turn into a list of the input's digits (input should now be [1,2,3, n...])
input = [int(i) for i in list(str(input))]
## 1: Generate index pairs that need to be added (i.e. [(0, 1), (1, 2), n...]). Chop off last input digit.
## 2: Once we have a list of index int tuples, add the two spots in the input number corresponding to those indexes (i, i+1).
## 3: Once we have a list of the added digit pairs, add those from left to right.
@sgammon
sgammon / datastructures.py
Created October 28, 2011 08:39
Experiments with Python datastructures
## Sample data
simplelist = [1, 2, 3, 4, 5]
listsample = ['Sam', 'Tyler', 'David', 'AJ']
people = [('Sam', 'Gammon'), ('Tyler', 'Porras'), ('David', 'Rekow'), ('Jackson', 'Harris')]
merchandise = {
'tshirts': ('SurviveSac T-Shirt', {'price': 5.99, 'orders': 15, 'options': ['small', 'large', 'xlarge']}),
'map': ('Field of Play Map', {'price': 3.0, 'orders': 28}),
'tickets': ('Ticket to Play', {'price': 5.0, 'orders': 1428})
@sgammon
sgammon / mappers.py
Created November 7, 2011 19:59
Example map/reduce mapper fn
import os
import logging
from mapreduce import context
from mapreduce import shuffler
from mapreduce import operation
from mapreduce import mapreduce_pipeline
from google.appengine.ext import db
from google.appengine.api import files
from google.appengine.ext import blobstore
@sgammon
sgammon / momentum-sublime-packages.json
Created January 16, 2012 21:25
Describes endpoints for custom Sublime addons built by momentum.
{
"schema_version": "1.1",
"packages": [
{
"name": "AppTools for Sublime",
"description": "Run tools in AppEngine Toolkit directly from Sublime.",
"author": "Sam Gammon (sgammon)",
"homepage": "http://apptools.github.com/integration/sublime",
"last_modified": "2012-01-16 13:30:00",
"platforms": {
(function($) {
var config, cfg,
options,
methods = {
init : function(options) {
config = $.extend({
(function($, window, document, undefined) {
// Feature tests shamelessly borrowed from Modernizr... unless Modernizr is available, in which case it is used
window._featureTests = {};
prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
omPrefixes = 'Webkit Moz O ms';
cssomPrefixes = omPrefixes.split(' ');
domPrefixes = omPrefixes.toLowerCase().split(' ');