- Taming the Modern Datacenter, Mitchell Hashimoto, Hashicorp
- look at the future of CM systems using Terraform, moving up a level from managing per-machine resources, enabling Infrastructure as Code for the modern distributed data center (mix of IaaS like AWS/DO, PaaS like Heroku, and SaaS for things like DNS and email); I'm a bit skeptical all the complexity of Terraform is significantly better than a minimal layer of glue code to wire up different APIs together.. still interesting though
- Towards a Data Driven Product, Techniques and Tools at GitHub, JD Maturen, GitHub
- covered the basics of data science & analytics, gave some insights into how GitHub does it
- Understanding Developers in a Post Agile Environment, Ward Cunningham (inventor of wiki), New Relic
- some interesting ideas on how to become a master engineer, "leveraged activities" vs. normal activities,
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
from flask import Flask, render_template_string, request | |
class CustomFlask(Flask): | |
jinja_options = Flask.jinja_options.copy() | |
jinja_options.update(dict( | |
block_start_string='<%', | |
block_end_string='%>', | |
variable_start_string='%%', | |
variable_end_string='%%', | |
comment_start_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
from flask import Flask, Blueprint, request | |
## blueprint ################################################################## | |
bp = Blueprint('category_functionality', __name__) | |
@bp.route('/') | |
def index(category): | |
return "this is the index page for %r" % category |
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
import time | |
from flask import Flask, request, g, render_template | |
app = Flask(__name__) | |
app.config['DEBUG'] = True | |
@app.before_request | |
def before_request(): | |
g.request_start_time = time.time() |
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
import os | |
from flask import Flask, Blueprint, g | |
api = Blueprint('api', __name__) | |
class Server(object): | |
def __init__(self, data): | |
self.data = 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
from flask import Flask, jsonify, Blueprint, current_app | |
import json | |
## REST api ################################################################### | |
api = Blueprint('api', __name__) | |
@api.route("/users") | |
def users(): | |
return jsonify(users=[ |
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
import unittest | |
from app import app | |
from cStringIO import StringIO | |
class UploadTest(unittest.TestCase): | |
def setUp(self): | |
self.app = app | |
self.app.config['TESTING'] = True | |
self.client = self.app.test_client() |
I hereby claim:
- I am lost-theory on github.
- I am stevek (https://keybase.io/stevek) on keybase.
- I have a public key whose fingerprint is D95C DED5 B2FE 16BF 8D7C 2CAF F3AE 0B74 973D 230D
To claim this, I am signing this object:
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
from flask import Flask, render_template_string, request | |
app = Flask(__name__) | |
app.config['DEBUG'] = True | |
@app.route("/") | |
def index(): | |
#of course you would put these into files | |
jinja_template = """ | |
{# this is a jinja2 comment #} |
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
#!/usr/bin/env python | |
'''\ | |
Usage: cookbookdiff COOKBOOK_NAME COOKBOOK_VER LOCAL_PATH [--nocolor] | |
Diff your LOCAL_PATH against what is on the chef server for a | |
given cookbook and version. | |
--nocolor: don't pipe output through 'colordiff' (in case you want to pipe to something else) | |
Examples: | |
cookbookdiff percona_toolkit 0.0.4 ~/chef-repo/cookbooks/percona_toolkit |
NewerOlder