I hereby claim:
- I am kmck on github.
- I am kmck (https://keybase.io/kmck) on keybase.
- I have a public key whose fingerprint is 9301 AF59 07DB 01B3 40E5 0C9C E2FA 0B60 B76B CE67
To claim this, I am signing this object:
(function($){ | |
/** | |
* Creates a version of the specified easing function averaged with linear | |
* easing at the specified weight | |
* | |
* @param name of original easing function | |
* @param weight of easing function (default 0.5) | |
* @return name of rounded easing function | |
*/ | |
$.linearBlendEase = function ( fn, weight ) |
function extract_colors() { | |
var colors = []; | |
$('body').find('*').each(function(i,o) { | |
var color; | |
if (color = $(o).css('color')) colors.push(color); | |
if (color = $(o).css('background-color')) colors.push(color); | |
if (color = $(o).css('border-top-color')) colors.push(color); | |
if (color = $(o).css('border-right-color')) colors.push(color); | |
if (color = $(o).css('border-bottom-color')) colors.push(color); | |
if (color = $(o).css('border-left-color')) colors.push(color); |
// Assumes jQuery | |
function form_submit(attributes, action, method) { | |
var $form = $('<form>').attr({ | |
method: method ||'post', | |
action: action || window.location.pathname | |
}); | |
$.each(attributes, function(name, value) { | |
$(value.indexOf('\n') < 0 ? '<input>' : '<textarea>').attr('name', name).val(value).appendTo($form); | |
}); | |
$form.appendTo('body').submit().remove(); |
function postForm(action, data) { | |
var form = document.createElement('form'); | |
form.method = 'POST'; | |
form.action = action; | |
var key, value, input; | |
for (key in data) { | |
value = data[key]; | |
if (value.indexOf('\n') < 0) { | |
input = document.createElement('input'); | |
input.name = key; |
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
@function icon-char($filename) { | |
$char: ""; | |
@if $filename == reblog { | |
$char: "\EA06"; | |
} |
// ## matte | |
// | |
// Calculate the color created by flattened the input color against a base color with an opacity | |
// | |
// @param {Color} $color: foreground color | |
// @param {Color} [$matte]: background color (or `transparent`) to matte the foreground against | |
// @param {Number} [$opacity]: mixing opacity of the foreground color, analogous to layer opacity | |
// in an image editor | |
// @return {Color} the matted color |
var _ = require('lodash'); | |
function canDiscard(assetPath, discardPatterns) { | |
if (!_.isArray(discardPatterns)) { | |
discardPatterns = [discardPatterns]; | |
} | |
return _.some(discardPatterns, function(discardPattern) { | |
if (_.isString(discardPattern)) { | |
return _.endsWith(assetPath, discardPattern); | |
} else if (_.isRegExp(discardPattern)) { |
var ReactComponentView = Backbone.View.extend({ | |
initialize: function(options) { | |
if (options) { | |
this.setComponent(options.ComponentClass, options.componentProps, options.componentChildren); | |
} | |
}, | |
setComponent: function(ComponentClass, componentProps, componentChildren) { | |
(typeof ComponentClass === 'undefined') || (this.ComponentClass = ComponentClass); | |
(typeof componentProps === 'undefined') || (this.componentProps = componentProps); |
I hereby claim:
To claim this, I am signing this object:
function serializeNodeToString(node) { | |
if (typeof XMLSerializer !== 'undefined') { | |
return new XMLSerializer().serializeToString(node); | |
} | |
if (node.outerHTML != null) { | |
return node.outerHTML; | |
} else if (node instanceof Document) { | |
return node.documentElement && node.documentElement.outerHTML | |
? node.documentElement.outerHTML | |
: ''; |