use git diff to generate file list
git diff --name-only master
add ext filter
git diff --name-only master | grep -E "(.js$|.ts$|.tsx$)"
#!/bin/bash | |
# ============================================ | |
# Created by: Richard Barrett | |
# Date Created: 11/11/2020 | |
# Purpose: MKE Auto Collector for Support Dump | |
# Company: Mirantis | |
# ============================================ | |
#set -e | |
# keep track of the last executed command |
function onOpen() { | |
var ui = DocumentApp.getUi(); | |
ui.createMenu('Convert to .RST') | |
.addItem('Convert to .RST and email me the result', 'ConvertToRestructuredText') | |
.addToUi(); | |
} | |
// Adopted from https://github.com/mangini/gdocs2md by Renato Mangini | |
// License: Apache License Version 2.0 | |
String.prototype.repeat = String.prototype.repeat || function(num) { |
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt | |
go tool pprof -http :8080 cpu.out | |
go tool pprof -http :8081 mem.out | |
go tool trace trace.out | |
go tool pprof $FILENAME.test cpu.out | |
# (pprof) list <func name> | |
# go get -u golang.org/x/perf/cmd/benchstat | |
benchstat bench.txt |
#!/bin/bash | |
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo | |
# Attempts to cleanly stop and remove all containers, volumes and images. | |
docker ps -q | xargs --no-run-if-empty docker stop | |
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes | |
docker volume ls -q | xargs --no-run-if-empty docker volume rm | |
docker images -a -q | xargs --no-run-if-empty docker rmi -f | |
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again. |
These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.
Download and install the git command-line client (if required).
Open the git bash window and introduce yourself to git (if required):
git config --global user.name 'Firstname Lastname'
git config --global user.email '[email protected]'
# How to connect to Azure AKS Kubernetes worker node by SSH | |
Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, | |
then you can use that VM as jump host and connect the worker via private IP. | |
Alternatively public IP can be assigned to a worker node. This readme shows how to do that. | |
## Steps how to attach public IP to a worker node | |
find out the resource group that AKS created for the node VMs |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |