Skip to content

Instantly share code, notes, and snippets.

@daleki
daleki / git_retag
Created October 4, 2021 19:10 — forked from lucijafrkovic/git_retag
Retagging on git
1. list all remote tags
git ls-remote --tags
2. delete local tag
git tag -d V_1_0_1
3. push tag deletion to remote
git push origin :refs/tags/V_1_0_1
4. tag local branch again

Keybase proof

I hereby claim:

  • I am daleki on github.
  • I am dalek (https://keybase.io/dalek) on keybase.
  • I have a public key ASB0qYRiszO0oYWFfjC5kPTyFoITMLd2aoQC469UMhBGhAo

To claim this, I am signing this object:

@daleki
daleki / gist:b1d176902bdce94de3a8e5abf900c682
Created October 6, 2016 23:36
Check AWS Go SDK credentials
//Check if credentials have been found
//https://github.com/aws/aws-sdk-go/issues/579
_, err := session.Config.Credentials.Get()
if err != nil {
log.Fatalf("ERROR: Unable to load credentials. Check ~/.aws/credentials or IAM instance profile. \n%s\n", err.Error())
}
aws ec2 describe-network-interfaces | egrep "PrivateIpAddress.*10" | sed 's/[[:space:]]//g' | sed -E 's/"PrivateIpAddress":"|"$//g'| sort -u -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4