This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Injector | |
register: (name, factory) -> | |
@[name] = factory | |
INJECTOR = new Injector | |
class EventBus | |
constructor: () -> | |
fire: (event_name, data) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Christopher Troup": [ | |
{ | |
item: "Coffee", | |
modifiers: [ | |
cream: 2, | |
sugar: 2 | |
], | |
amount: 1 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Modifier | |
constructor: (@name, @amount) -> | |
class Item | |
constructor: (@item_name) -> | |
addModifier: (modifier) -> | |
@modifiers.push(modifier) | |
class Order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
GData Python doesn't pick up the calendar color entry, and clobbers the namespace somehow, so manual parsing is required for now :( | |
""" | |
cal = client.GetCalendarEntry(cal_href) | |
blacklist_color = cal.color.value | |
if not blacklist_color: | |
for child in cal.FindChildren(): | |
xmlstr = child.to_string() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myauthclass = function(rsa_key) { | |
var private_key = rsa_key; | |
var send_request = function(url) { | |
var final_url = sign(url, private_key); | |
gadgets.io.makeRequest(final_url); | |
} | |
return { | |
'send_request': send_request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
background: #002a54; | |
color: #FFF !important; | |
} | |
#clouds { | |
background-image: url('http://gtrax.s3.amazonaws.com/nyan-sub.png') !important; | |
} | |
div#header { | |
background: #00162d !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def api_object_update(request): | |
try: | |
Model.update(request.POST) | |
except Exception, e: | |
pass # This should never happen. | |
return HttpResponse(status_code=200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends base.html %} | |
<form action=""> | |
{% for vote in votes %} | |
{{ vote.position }}: | |
{% for position in vote.possible_positions %} | |
<input type="radio" name="vote_{{vote.pk}}" value="{{position}}" /> | |
{% endfor %} | |
{% endfor %} | |
<input type="hidden" name="voting_on" value="{% for vote in votes %}vote.pk,{% endfor %}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class M(object): | |
def __init__(self, *args, **kwargs): | |
super(M, self).__init__() | |
setattr(self, "foo", self.baz) | |
setattr(self, "other_long_name", self.baz) | |
setattr(self, "metatastic", True) | |
@classmethod | |
def baz(cls): | |
return "FooBaz -- Base class %s" % cls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Data.SqlClient | |
Public Enum updateType | |
add1 | |
realupdate | |
End Enum | |
Public Class CartSQL | |
Public Function getCart(ByVal cartid As String) As DataTable | |
Dim objdal As New DAL | |
Dim mycmd As New SqlCommand | |
mycmd.Parameters.Clear() |