Skip to content

Instantly share code, notes, and snippets.

View maxbeatty's full-sized avatar

Max Beatty maxbeatty

View GitHub Profile
@maxbeatty
maxbeatty / bdc.js
Last active August 29, 2015 14:12 — forked from bendc/functional-inheritance.js
Constructor comparisons in performance and memory usage
function car() {
return {
start: function() {
return "Engine on."
},
accelerate: function() {
return "Let's go!"
}
}
}
arr1 = ['T-GEO-US', 'T-GEO-CA']
arr2 = ['T-GEO-US', 'T-GEO-GA']
targetings = [arr1, arr2]
# we want only T-GEO-US to be returned
# Current:
flatTargetings = [].concat.apply [], targetings
# flatTargetings = ['T-GEO-US', 'T-GEO-CA', 'T-GEO-US', 'T-GEO-GA']
geoTargetings = _.uniq flatTargetings
findAllWithLineItems: (id, searchCriteria, cb) ->
self = @
Step(
->
self.findAll searchCriteria, @
return
(err, orders) ->
return cb err if err
@maxbeatty
maxbeatty / Gemfile
Created July 9, 2013 21:52 — forked from sr/Gemfile
source "http://rubygems.org"
gem "janky", "~>0.9"
gem "pg"
gem "thin"
@maxbeatty
maxbeatty / markup.html
Created August 3, 2012 17:38 — forked from kylebragger/markup.html
Using pseudo content instead of empty span for gradient
<div id=conference-call>
<div class="datetime">
<span>Sept</span>
<span>25</span>
<span>11:30 <strong>AM</strong></span>
</div>
</div>
// original
@import "mgmt/sprites/icons/*.png";
$icons: sprite-map("mgmt/sprites/icons/*.png");
.test {
background: transparent $icons no-repeat 0 0;
}
// my test
$cc: sprite-map("sprites/icons/credit-cards/*.png")
// original
@import "mgmt/sprites/icons/*.png";
$icons: sprite-map("mgmt/sprites/icons/*.png");
.test {
background: transparent $icons no-repeat 0 0;
}
// my test