Based on: https://gist.github.com/mwhite/6887990
[alias]
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
git branch | grep -v "master\|develop\|release" | xargs git branch -D |
Based on: https://gist.github.com/mwhite/6887990
[alias]
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
const fetch = require('node-fetch') | |
async function fetchDogsImagesSequential(dogs) { | |
const images = [] | |
for (const dog of dogs) { | |
const response = await fetch(`https://dog.ceo/api/breed/${dog}/images/random/3`) | |
const data = await response.json() | |
images.push({ |
const fetch = require('node-fetch') | |
const pipe = require('p-pipe') | |
const { table } = require('table') | |
async function fetchDogs(dogs) { | |
const promises = dogs.map(async function (dog) { | |
const response = await fetch(`https://dog.ceo/api/breed/${dog}/images/random/1`) | |
const data = await response.json() | |
return { | |
[dog]: data.message |
#!/bin/bash | |
# Generates a list of CIDRs given an Azure IP Ranges JSON file | |
# https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519 | |
INPUT_FILENAME=$1; # Name of the JSON file downloaded from MS website (ServiceTags_Public_YYYYMMDD.json) | |
OUTPUT_FILENAME=cidr_list.txt | |
if [ -z $INPUT_FILENAME ] | |
then |
#!/bin/bash | |
# This script updates Azure Vault network ACLs given list of IP Addresses in CIDR format | |
VAULT_NAME=$1; # Vault name | |
INPUT_FILENAME=cidr_list.txt | |
if [ -z $VAULT_NAME ] | |
then | |
printf "Incorrect usage. Please use: ./update.sh [vault_name]\n"; |
cat input.json | jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' > output.csv |
### Keybase proof | |
I hereby claim: | |
* I am rproenca on github. | |
* I am proenr (https://keybase.io/proenr) on keybase. | |
* I have a public key ASDlJxkD5QtJUszTbPVNFaCwDhaqM4_uqUo6VJNpJAkSPAo | |
To claim this, I am signing this object: |
/* | |
Usage | |
----- | |
$ npm init | |
$ npm install axios | |
Replace variables "token", "smartsheetId" and "payload" | |
$ node smartsheet_column_mapper.js |
const getRandomString = length => { | |
let s = ''; | |
do { | |
s += Math.random() | |
.toString(36) | |
.substring(2); | |
} while (s.length < length); | |
s = s.substr(0, length); |