Skip to content

Instantly share code, notes, and snippets.

View StianOvrevage's full-sized avatar

Stian Øvrevåge StianOvrevage

View GitHub Profile
@StianOvrevage
StianOvrevage / aks-credentials.md
Last active March 19, 2020 11:10
Get all AKS credentials with jq

Get AKS credentials for all clusters on current subscription:

bash <(az aks list | jq -r '.[] | "az aks get-credentials --overwrite-existing --admin --resource-group \(.resourceGroup|@sh) --name \(.name|@sh)"')

To list and change subscriptions, use:

az account list --output table

az account set --subscription "MySub"

@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@bradoaks
bradoaks / hfsc-shape.sh
Created April 25, 2011 14:51 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.