This file contains hidden or 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 proxy = new Proxy(() => proxy, { get: () => proxy }); | |
// proxy.do().whatever.you.want().to.do() |
This file contains hidden or 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
Promise.prototype.safe = function () { | |
return this.then(data => { | |
if (data instanceof Error) return [data]; | |
return [null, data]; | |
}).catch(err => [err]); | |
} | |
// const [err, result] = await promise.safe(); |
This file contains hidden or 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
# list of IPs from https://docs.travis-ci.com/user/ip-addresses/ | |
## Linux and Windows | |
npm token create --cidr=$(echo $(dig +short {nat.gce-us-central1.travisci.net,nat.gce-us-east1.travisci.net}) | sed 's_ _/32,_g')/32 | |
## OSX | |
npm token create --cidr=$(echo $(dig +short nat.macstadium-us-se-1.travisci.net) | sed 's_ _/32,_g')/32 | |
## ALL | |
npm token create --cidr=$(echo $(dig +short nat.travisci.net) | sed 's_ _/32,_g')/32 |
OlderNewer