If you've added a new remote, you might want to push all your branches to it:
git push new-remote --all
Maybe you want to cherry-pick from a different branch and you need to know the commit hash:
#!/bin/bash | |
usage="Input piped docker-compose logs -t, or a file created from this command, to show logs lines sorted by time.\n\n Usage:\n\n $(basename "$0") [-h|--help] - this message\n $(basename "$0") - runs default docker-compose logs -t and sorts'em\n docker-compose logs -t|$(basename "$0") - pipe logs to this command\n $(basename "$0") my-compose.log - or choose file with logs to display\n\n" | |
[ $# -ge 1 -a -f "$1" ] && input="$1" || input="-" | |
case "$1" in | |
-h|--help) printf "$usage" | |
exit | |
;; | |
esac | |
if [ -t 0 ]; then | |
docker-compose logs -t|sort -t "|" -k +2d |
function exponentialBackoff(toTry, max, delay, callback) { | |
new Promise(function(resolve, reject) { | |
// do a thing then… | |
var ret = toTry.toString(); | |
ret = ret.substr('function '.length); | |
ret = ret.substr(0, ret.indexOf('(')); | |
console.log('EB '+ret+' max',max,'next delay',delay); | |
var result = toTry(); | |
if (result) { |
# From PowerShell ADMINISTRATOR session run | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# Open new PowerSheel Administrator session and run | |
# $cred=Get-Credential domain\username (can also use [email protected] MSA style username) | |
# Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/tylergibson/bd7a4c923db6bc0bd0a3ca05473dd4f7/raw -Credential $cred | |
# Initialize reboot log file | |
$reboot_log = "C:\installation.rbt" | |
if ( -not (Test-Path $reboot_log) ) { New-Item $reboot_log -type file } |
expbackoff() { | |
# Exponential backoff: retries a command upon failure, scaling up the delay between retries. | |
# Example: "expbackoff my_command --with --some --args --maybe" | |
local MAX_RETRIES=${EXPBACKOFF_MAX_RETRIES:-8} # Max number of retries | |
local BASE=${EXPBACKOFF_BASE:-1} # Base value for backoff calculation | |
local MAX=${EXPBACKOFF_MAX:-300} # Max value for backoff calculation | |
local FAILURES=0 | |
while ! "$@"; do | |
FAILURES=$(( $FAILURES + 1 )) | |
if (( $FAILURES > $MAX_RETRIES )); then |
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"eventHubName": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"resourceLocation": "[resourceGroup().location]", |
{ | |
"$schema": "http://schemas.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"appName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the function app that you wish to create." | |
} | |
}, |
const http = require('http'); | |
const url = require('url'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const port = process.argv[2] || 9000; | |
http.createServer(function (req, res) { | |
console.log(`${req.method} ${req.url}`); | |
// parse URL |
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |
curl -H "Origin: http://example.com" \ | |
-H "Access-Control-Request-Method: POST" \ | |
-H "Access-Control-Request-Headers: X-Requested-With" \ | |
-X OPTIONS --verbose \ | |
http://localhost:8545 |