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
brew install tinyproxy | |
tinyproxy -c /usr/local/etc/tinyproxy/tinyproxy.conf -d | |
Tests: | |
NO AUTH | |
curl -iv --noproxy "*" --location http://www.google.com | |
AUTH FAIL |
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 setRelAttribute() { | |
const elems = document.body.getElementsByTagName('a'); | |
for (let i = 0; i < elems.length; i++) { | |
const elem = elems[i]; | |
elem.setAttribute('rel', 'noopener noreferrer nofollow'); | |
} | |
} | |
const ready = (callback) => { | |
if (document.readyState !== 'loading') callback(); |
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 generaTemplate (strings, ...keys) { | |
return function(data) { | |
let temp = strings.slice(); | |
keys.forEach((key, i) => { | |
temp[i] = temp[i] + data[key]; | |
}); | |
return temp.join(''); | |
} | |
} |
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
#%RAML 1.0 Library | |
traits: | |
FilterableByPrice: | |
queryParameters: | |
priceLessThen?: | |
type: number | |
priceMoreThen?: | |
type: number | |
resourceTypes: |
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 express = require('express'); | |
var app = express(); | |
var q = require('q'); | |
function retryingPromise(fn, cfg, times) { | |
var counter = 0; | |
var delay = 0; | |
var _times = times ? times : 2; | |
var _step = _step ? step : 1000; | |
var _cfg = cfg ? cfg : {}; |