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
function limitCalls(fn, maxCall) { | |
if (!fn.called) { | |
fn.called = 0; | |
} | |
return function() { | |
if (fn.called < maxCall) { | |
fn.called++; | |
return fn.apply(null, arguments); | |
} |
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 http = require('http'); | |
var qs = require('querystring'); | |
function parseSerialisedQueryParam(request, paramName, delimiter) { | |
delimiter = delimiter || ','; | |
var url = request.url; | |
var rawQuery = require('url').parse(url).query; | |
var parsedQuery = qs.parse(rawQuery, null, null, { | |
decodeURIComponent: function(param) { | |
return param; |
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
function inherits(constructor1, constructor2) { | |
constructor1.prototype = extend(constructor2.prototype); | |
} | |
function objectEmpty(obj) { | |
return Object.keys(obj).length === 0 && obj.constructor === Object; | |
} | |
function extend() { | |
var i = -1, | |
current, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'> | |
<link href='https://fonts.googleapis.com/css?family=Raleway:400,700,500' rel='stylesheet' type='text/css'> | |
<style type="text/css"> | |
html { | |
height: 100%; | |
position: relative; |
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
Array.isEqual = function(a, b) { | |
if (a === b) { | |
return true; | |
} | |
// We do not expect string arguments | |
if (typeof a === 'string' || typeof b === 'string') { | |
return false; | |
} | |
// We need array like arguments (e.g. NodeList) |
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
const hasKeyDeep = ((_) => { | |
return (object, keyName) => { | |
let hasKey = false; | |
if (_.has(object, keyName)) { | |
return true; | |
} | |
_.forEach(object, (value) => { | |
if (_.isObject(value)) { | |
hasKey = hasKeyDeep(value, keyName); |
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
* aws_cloudfront_distribution.s3_ui_distribution: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue. | |
Please include the following information in your report: | |
Terraform Version: 0.7.13 | |
Resource ID: aws_cloudfront_distribution.s3_ui_distribution | |
Mismatch reason: attribute mismatch: origin.874400726.custom_header.# | |
Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"http_version":*terraform.ResourceAttrDiff{Old:"", New:"http2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cache_behavior.948431832.default_ttl":*terraform.ResourceAttrDiff{Old:"", New:"3600", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cache_behavior.948431832.min_ttl":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved: |
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
;((Object) => { | |
Object.prototype.keys = Object.prototype.keys || function() { | |
return Object.keys(this); | |
} | |
Object.prototype.values = Object.prototype.values || function() { | |
return this.keys().map(key => this[key]); | |
} | |
Object.prototype.items = Object.prototype.items || function() { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JPG to PNG</title> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
padding: 0; | |
height: 100%; | |
text-align: center; |
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
Function.prototype.bind = Function.prototype.bind || function() { | |
var args = Array.prototype.slice.call(arguments); | |
var context = args[0]; | |
var fn = this; | |
return function() { | |
var fnArgs = Array.prototype.slice.call(arguments); | |
fn.apply(context, args.slice(1).concat(fnArgs)); | |
} | |
} |
OlderNewer