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
public class WebApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" }) | |
} | |
} |
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
module.exports = [ | |
{ "name": "Brunch.io", "shortName": "brunch", "soId": "brunch", "_id": "514825fa2a26ea020000000b", "__v": 0 }, | |
{ "name": "C#", "shortName": "c#", "soId": "c#", "_id": "514825fa2a26ea020000000e", "__v": 0 } ] |
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 util = require('../../../shared/util') | |
var braintree = require('braintree') | |
var {merchantId, publicKey, privateKey} = config.payments.braintree | |
var environment = braintree.Environment[config.payments.braintree.environment] | |
var gateway = braintree.connect({ environment, merchantId, publicKey, privateKey }) | |
var logging = false |
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
web: ./node_modules/.bin/coffee app.coffee |
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
users = require './../data/users' | |
data = users: [] | |
data.users.anon = authenticated: false | |
data.users.admin = users[0] | |
data.users.jk = users[1] | |
data.users.artle = users[5] | |
data.users.beountain = users[4] | |
setSession = (userKey) -> |
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 _JQ = document.createElement('script'); | |
_JQ.src = 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js'; | |
_JQ.type = 'text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(_JQ); |
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
BB = require 'badass-backbone' | |
M = require './models' | |
V = require './views' | |
# Inherit from BadassAppRouter to get Badass Backbone conventions | |
module.exports = class Router extends BB.BadassAppRouter | |
logging: on | |
pushState: off # Set off for simple example |
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
""" | |
BadassRouter takes the philosophical position that only one router can be | |
used for one html page / single page app. It is conceptually the top most | |
container object other than window that contains all instances associated with the app. | |
""" | |
module.exports = class BadassRouter extends Backbone.Router | |
# Set logging on /off - Very dandy during dev to see flow of routes | |
logging: off |
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
#!/bin/sh | |
killall node | |
brunch watch --server -c config-test.coffee & | |
mocha test/server/all.coffee | |
mocha-phantomjs http://localhost:3333/test/index.html |
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
""" BadassView add 3 basic bits of functionality to a normal Backbone.View | |
1) Auto-logging of initialize, render & save | |
2) Auto setting constructor args as attributes on view instances | |
3) Short elm() to access an html element based on it's name attribute | |
""" | |
module.exports = class BadassView extends Backbone.View | |
# Set logging on /off | |
# Why? : During dev it's handy to see the flow your views execute in | |
logging: on |
NewerOlder