Terms in an intersection operation are commutative.
a ∩ b = b ∩ a
| // extended from https://github.com/FarhadG/init | |
| (b=>fetch(new Request('https://api.github.com/repos/'+b[1]+'/commits?sha='+(b[2]||''),{ | |
| headers: new Headers({Authorization:'token ...'}), | |
| })) | |
| .then(c=>Promise.all([c.headers.get('link'),c.json()])) | |
| .then(c=>{ | |
| if(c[0]){ | |
| var d=c[0].split(',')[1].split(';')[0].slice(2,-1); | |
| return fetch(new Request(d,{ | |
| headers: new Headers({Authorization:'token ...'}), |
| package db | |
| // stdlib | |
| import ( | |
| "fmt" | |
| "os" | |
| ) | |
| // external | |
| import ( |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * The idea here is to support named regexp parameters by returning a proxy with a getter function | |
| * TODO add Proxy | |
| */ | |
| class RegExp2 extends RegExp { | |
| constructor(regexpStr, ...names) { | |
| super(regexpStr) | |
| this.names = names; | |
| } | |
| exec(str) { |
| let chance = require('chance').Chance(); | |
| let math = require('mathjs'); | |
| let newItem = function() { | |
| return { | |
| a: chance.natural({min: 1, max: 20}), | |
| b: chance.pickone(['alpha', 'bravo', 'charlie', 'delta', 'echo']), | |
| c: chance.pickset(['alpha', 'bravo', 'charlie', 'delta', 'echo'], 2), | |
| d: chance.natural({min: 1, max: 2}), | |
| sanity: 1 |
| # This requires the aws cli and jq | |
| # First pull down existing firehose streams | |
| # This will create files with the name of the stream in a 'streams' folder | |
| mkdir streams | |
| aws firehose list-delivery-streams --limit 100 | jq '.DeliveryStreamNames[]' | xargs -L 1 -I {} sh -c "aws firehose describe-delivery-stream --delivery-stream-name {} > streams/{}.json" | |
| # Make your changes to the files... | |
| # This will push the copy options from each file to firehose |
| package main | |
| import( | |
| "fmt" | |
| "log" | |
| "github.com/nats-io/nats" | |
| "time" | |
| ) | |
| func main(){ |
| BITBUCKET_ORG_NAME='' | |
| BITBUCKET_REPO_NAME=$1 | |
| if [ -n "$2" ]; then | |
| GITHUB_REPO_NAME=`echo $2 | tr '[:upper:]' '[:lower:]'` | |
| else | |
| GITHUB_REPO_NAME=$BITBUCKET_REPO_NAME | |
| fi | |
| GITHUB_ORG_NAME='' |
| function tabname { | |
| printf "\e]1;$1\a" | |
| } | |
| function winname { | |
| printf "\e]2;$1\a" | |
| } |