Skip to content

Instantly share code, notes, and snippets.

@cherti
cherti / alert.sh
Created Dec 9, 2016
send a dummy alert to prometheus-alertmanager
View alert.sh
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@cherti
cherti / switch_branch.sh
Created Jun 20, 2020
help switching a git repo's default branch from master to main
View switch_branch.sh
#!/bin/bash
# this script will assist you in migrating git-repositories from
# the primary branch 'master' to the primary branch 'main'.
# It currently works with only one remote (adjust accordingly if you
# have more than one), the name of which is taken as the first argument.
#
# Example: bash switch_branch.sh origin
#
# It will
View keybase.md

Keybase proof

I hereby claim:

  • I am cherti on github.
  • I am cherti (https://keybase.io/cherti) on keybase.
  • I have a public key whose fingerprint is 9393 3D08 35F9 BC8A 02BB 5D41 138F BE3C 3B0F 5529

To claim this, I am signing this object:

You can’t perform that action at this time.