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
➜ pybuffalo git:(good) ab -v 1 -n 1000 -c 100 http://localhost:8888/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
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
{ | |
"zones": [ | |
{ | |
"name": "Garbonzo Zone", | |
"trails": [ | |
{ | |
"status": { | |
"id": 0, | |
"name": "Open" | |
}, |
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
{ | |
"status": { | |
"id": 0, | |
"name": "Open" | |
}, | |
"name": "Captain Safety", | |
"level": { | |
"difficulty": "Most Difficult", | |
"id": 3, | |
"name": "Double Black Diamond" |
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
$("*[data-view]").each(function(i,obj) { | |
var $this = $(this); | |
var viewDataAttr = $this.data("view"); | |
if (app.views[viewDataAttr] && typeof(app.views[viewDataAttr]) === "function") { | |
console.log("Found view: " + viewDataAttr); | |
views.push(new app.views[viewDataAttr]); | |
} | |
}); |
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
app.views.ChallengesNav = Backbone.View.extend({ | |
collection : new app.collections.Challenges(), | |
template : Handlebars.compile(app.templates.ChallengesNav), | |
initialize: function() { | |
//this.listenTo(this.collection, 'change', this.render); | |
_.bindAll(this, "render"); | |
this.collection.fetch({ | |
success: this.render | |
}); |
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
app.views.ChallengesNav = Backbone.View.extend({ | |
collection : new app.collections.Challenges(), | |
template : Handlebars.compile(app.templates.ChallengesNav), | |
initialize: function() { | |
this.collection.bind('change', this.render(), this); | |
}, | |
render: function() { | |
$('#challenge-nav').html(this.template({challenges : this.collection.models})); |
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 java.beans.Encoder; | |
import java.io.Serializable; | |
import java.net.URL; | |
import java.net.URLEncoder; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class CategoryPersistance implements Serializable { |
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
models/__init__.py: | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
DBSession = scoped_session(sessionmaker(autoflush=True)) | |
Base = declarative_base() | |
def initialize_sql(engine): |
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 | |
# By Chris Hunter | |
import random | |
import re | |
## | |
# getRandomSamplingOfEmails | |
# Returns a deduplicated random set of n length from a given m set of emails | |
# Uses regex to test for email address | |
# Safe for n less than 0, greater than length of given mSet |
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
// handlers | |
handlersLoggedOut: function() { | |
var pm = this; | |
$('.media-item').draggable({ | |
revert: true, | |
helper: 'clone', | |
cursor: 'move', | |
distance: 10, | |
start: function() { |