This file contains hidden or 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
$.webshims.setOptions 'basePath', "/js-webshim/minified/shims/" | |
# $.webshims.setOptions 'basePath', "/js-webshim/dev/shims/" | |
# ES5 provides Array and String methods (and other misc) that are missing in | |
# older browsers. | |
$.webshims.polyfill 'es5' | |
# Boot Angular.js manually. We can't do it with ng-app anymore because we need | |
# the polyfills to be loaded before Angular, but the polyfills load asynchronously. | |
$ -> |
This file contains hidden or 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
[color] | |
branch = auto | |
diff = auto | |
status = true | |
ui = true |
This file contains hidden or 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
require File.dirname(__FILE__) + '/config/boot' | |
require './blaze_control_panel' | |
application = Rack::Builder do | |
use Rack::SslEnforcer if ENV['RACK_ENV'] == 'production' | |
use Rack::CommonLogger, File.new('log/access.log', 'a+') | |
use GoogleOpenIdAuth | |
run Rack::Cascade.new [::API::V1::Blaze, BlazeControlPanel] |
This file contains hidden or 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
~ ⮁ pinion ⮁ oimtool ⮀ master + ⮀ $ ⮀oim ec2 add bcp | |
path.existsSync is now called `fs.existsSync`. | |
Identity added: /Users/jamessadler/.ssh/oim-cp.pem (/Users/jamessadler/.ssh/oim-cp.pem) | |
knife ec2 server create --ssh-user=ubuntu --image=ami-a29943cb --flavor=m1.small --groups=bcp --run-list=role[base],role[bcp] --region=us-east-1 --availability-zone=us-east-1a --ssh-key=oim-cp --tags=Name=bcp-us --node-name=bcp-us | |
Instance ID: i-af361cd0 | |
Flavor: m1.small | |
Image: ami-a29943cb | |
Region: us-east-1 | |
Availability Zone: us-east-1a | |
Security Groups: bcp |
This file contains hidden or 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
forEach(actions, function(action, name) { | |
var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH'; | |
FancyResource[name] = function(a1, a2, a3, a4) { | |
var params = {}; | |
var data; | |
var success = noop; | |
var error = null; | |
switch(arguments.length) { | |
case 4: |
This file contains hidden or 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
CreativesController = ($scope, Creative, flash) -> | |
Creative.query (creatives) -> | |
$scope.creatives = creatives | |
# Delete an Creative | |
$scope.remove = (creative) -> | |
success = -> | |
$scope.creatives = _.reject $scope.creatives, (s) -> s is creative | |
flash.success 'successfully deleted creative' | |
error = -> |
This file contains hidden or 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
filename = "some file name.with dots.html.markdown" | |
parts = f.split(".") | |
last_index_of_spc = parts.index(parts.select{|s| s =~ / /}.last) | |
suffix = parts[last_index_of_spc + 1..-1] | |
prefix = parts[0..last_index_of_spc].join(".") | |
p [prefix, suffix] |
This file contains hidden or 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
global.effingPuts = ( -> | |
fs = require 'fs' | |
sys = require 'sys' | |
(msg) -> | |
if typeof msg is 'String' | |
fs.writeSync 1, msg | |
else | |
fs.writeSync 1, sys.inspect(msg) | |
fs.fsyncSync 1 | |
)() |
This file contains hidden or 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
doctype 5 | |
html(lang="en", ng-app="blaze-control-panel") | |
head | |
title 'Blaze Control Panel' | |
meta(name="viewport", content="width=device-width, initial-scale=1.0") | |
link(href="css/bootstrap.css", rel="stylesheet", type="text/css") | |
link(href="css/bootstrap-responsive.css", rel="stylesheet", type="text/css") | |
link(href="css/app.css", rel="stylesheet", type="text/css") | |
script(src='js/lib/jquery-1.8.0.min.js') | |
script(src='js/lib/underscore-1.3.3.min.js') |
This file contains hidden or 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
For example, I was co-founder of a startup called Neowurks (yeah shit name) | |
about 10 years ago. | |
It was an app for the telco industry, in the area of rates exchange and route | |
provisioning. | |
At least once per week, all the telcos would exchange their rates for | |
terminating calls at major cities around the world. Pricing was per million | |
minutes, at 4 or 5 levels of quality of service and for mobile versus landline. |