Skip to content

Instantly share code, notes, and snippets.

@speric
speric / multisite.rb
Created November 20, 2012 19:54
Multisite Shop Example w/MongoDB
# Order class
# see http://www.slideshare.net/wonko/persisting-dynamic-data-with-mongodb-and-mongomapper
class Order
include MongoMapper::Document
key :order_id, String
class << self
def for_site(site)
klass = Class.new(self)
@speric
speric / resize.js
Created May 14, 2012 12:10
Resize w/jQuery
<script src="/javascripts/jquery.resize.js"></script>
<script>
$('.agency_talent_photo').resize(150);
</script>
@speric
speric / sendgrid.py
Created April 26, 2012 16:29
Grab bounced emails from Sendgrid
import tornado.options
import urllib2
import json
from tornado.options import define, options
if __name__ == "__main__":
define("username", help="Your Sendgrid username (usually an email address)")
define("password", help="Your Sendgrid password")