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
window.Clipboard = (function(window, document, navigator) { | |
var textArea, | |
copy; | |
function isOS() { | |
return navigator.userAgent.match(/ipad|iphone/i); | |
} | |
function createTextArea(text) { | |
textArea = document.createElement('textArea'); |
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 |
const AWS = require('aws-sdk'); | |
const {parallelScan} = require('@shelf/dynamodb-parallel-scan'); | |
const TABLE_NAME = '[table-name]'; | |
const PRIMARY_PARTITION_KEY = '[partition-key]'; | |
async function fetchAll() { | |
const CONCURRENCY = 250; | |
const alias = `#${PRIMARY_PARTITION_KEY}`; | |
const name = PRIMARY_PARTITION_KEY; |
#!/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 |
const getRandomString = length => { | |
let s = ''; | |
do { | |
s += Math.random() | |
.toString(36) | |
.substring(2); | |
} while (s.length < length); | |
s = s.substr(0, length); |