Keybase proof
I hereby claim:
- I am jarcoal on github.
- I am jarcoal (https://keybase.io/jarcoal) on keybase.
- I have a public key ASDQA1LOJi9YwraJWlNuIQDFaqu-SI6eOSm_w9K9t9zlPwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Create mixin to extend Records with a custom destroy method | |
app.factory('restmodDestroyMixin', function(restmod) { | |
return restmod.mixin({ | |
$extend: { | |
Record: { | |
$destroyImmediately: function() { | |
this.$scope.$remove(this); | |
return this.$destroy(); | |
}, | |
} |
var svgColor = function(color) { | |
return function(shape, sprite, callback) { | |
var paths = shape.dom.getElementsByTagName('path'); | |
for (var i = 0; i < paths.length; i++) { | |
paths[i].setAttribute('fill', color); | |
} | |
callback(null); | |
}; | |
}; |
package httpmock | |
import ( | |
"errors" | |
"net/http" | |
) | |
// Responders are callbacks that receive and http request and return a mocked response. | |
type Responder func(*http.Request) (*http.Response, error) |
<snippet> | |
<content><![CDATA[ | |
assert.Equal(t, ${1:err}, nil) | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>aerr</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.go</scope> | |
</snippet> |
angular.module('moment', []).factory('moment', ['$window', function($window){ | |
return $window.moment; | |
}]).filter('moment', ['moment', function(moment) { | |
return function(dateString, format) { | |
return moment(dateString).format(format); | |
}; | |
}]); |
local radius, x, y = unpack(ARGV) | |
local locations = redis.call('HGETALL', KEYS[1]) | |
local nearby = {} | |
for i = 1, #locations, 2 do | |
local cid, cloc = locations[i], locations[i+1] | |
local cx, cy = string.sub(cloc, 1, 2), string.sub(cloc, 3, 4) | |
if (cx - x)^2 + (cy - y)^2 <= radius^2 then | |
table.insert(nearby, cid) |
body.modal-open { | |
overflow: hidden; | |
} | |
.modal-backdrop { | |
.hide; | |
background-color: rgba(255, 255, 255, 0.8); | |
.opacity(100); | |
overflow-x: auto; |
heroku config:add JS_VERSION=1 CSS_VERSION=1 --app=YOUR_APPLICATION_NAME |
<ul> | |
{% for product in products %} | |
<li> | |
<h4>{{ product.name }}</h4> | |
<ul> | |
{% for feature in product.feature_set.all %} | |
<li>{{ feature.name }}</li> | |
{% endfor %} | |
</ul> |