Skip to content

Instantly share code, notes, and snippets.

View tschieggm's full-sized avatar

Matthew Tschiegg tschieggm

  • Google
  • Boston MA
View GitHub Profile
@tschieggm
tschieggm / angular-example.html
Created February 4, 2014 19:56
angular idiosyncrasies
<!-- this breaks -->
<div>
<div class="row-fluid">
<sd:directive ng-repeat="x in list" param="x" />
<h1>Hello?</h1>
</div>
</div>
<!-- one working alternative -->
<div>

This is an anti-pattern explicitly called out in the SqlAlchemy documents.

From the docs

 ### this is the **wrong way to do it** ###

class ThingOne(object):
    def go(self):
 session = Session()
@tschieggm
tschieggm / flask_server.py
Created November 22, 2013 18:51
Stackdriver webhook server example
import string
import sys
import logging
import json
from flask import Flask
from flask import Response, request
logger = logging.getLogger(__name__)
logger.info("Stackdriver webhook-sample starting up on %s" % (string.replace(sys.version, '\n', ' ')))
@tschieggm
tschieggm / app-start.js
Created September 5, 2012 04:58
Trying to learn Marionette
(function (app, $, backbone, marionette, options, undefined) {
app = new marionette.Application();
app.addInitializer(function () {
app.Log("configuring marionette template compiler");
marionette.TemplateCache.prototype.compileTemplate = function (rawTemplate) {
return Hogan.compile(rawTemplate);
};
});