Skip to content

Instantly share code, notes, and snippets.

View esatterwhite's full-sized avatar
:octocat:

Eric Satterwhite esatterwhite

:octocat:
View GitHub Profile
@esatterwhite
esatterwhite / api.py
Created May 11, 2012 11:58
Returning data on POST request with Tastypie
'''
Generates a stupid api the illustrates returning POST data from tastypie
'''
import random
import shelve
from hashlib import md5
from datetime import datetime
from django.utils import simplejson
from tastypie.resources import Resource
from tastypie.authorization import ReadOnlyAuthorization, DjangoAuthorization, Authorization
@esatterwhite
esatterwhite / index.html
Created December 8, 2011 16:11
Live Twitter feed for Node.js, spark & mootools
<html>
<head>
<title>Socket.IO Example</title>
<script src="http://apollo.dyn.mke.corvisa.com:8080/static/js/mootools.js"></script>
<script src="http://apollo.dyn.mke.corvisa.com:4000/socket.io/socket.io.js"></script>
<style>
html,body{background:#888;}
h1{color:#FF9900;font-family:'Trebuchet MS',helvetica, arial, sans-serif;border-bottom:1px solid #333; padding:6px;margin-bottom:4px;text-shadow:#333 0 1px 0;}
ul{margin:0;padding:0;}
#tweets li{
@esatterwhite
esatterwhite / log.js
Created August 26, 2011 18:20
AMD Style module for adding logging to existing objects
/**
*
* AMD module for logging function calls. Intended for use with require.js ( http://www.requirejs.org )
* inspired by Mootools Log ( https://github.com/mootools/mootools-more/blob/1.2x/Source/Core/Log.js )
* and js-klib ( http://code.google.com/p/js-klib/source/browse/klib.js )
* @author Eric Satterwhite
* @module log
*/
define(['require','exports','array'],function(require, exports, array){
var has_log = ( console && console.log );
@esatterwhite
esatterwhite / ModelForm.js
Created July 26, 2011 13:37
Class For rendering and validating forms in Sencha Touch
/**
* Module for General utility functions and classes
* @module utils
*
*/
Ext.ns('BlackjackM','BlackjackM.utils', 'BlackjackM.utils.forms');
/**
* A class which renders and validates a form based on a Ext.data.Model or Model instace
@esatterwhite
esatterwhite / ModalForm.js
Created April 26, 2011 20:48
ExtJS User Group Modal Form Example
/**
* Base Module for Generic Components
* @module Blackjack
*/
/**
* Class for creating Modal form objects.
* Meant to work with Blackjack.FormFactory
* @extends Ext.Window
* @namespace Blackjack