Skip to content

Instantly share code, notes, and snippets.

View floodkoff's full-sized avatar

Misha Fludkov floodkoff

  • Neat.no
  • Oslo, Norway
View GitHub Profile
@floodkoff
floodkoff / dyndns.sh
Created December 23, 2016 18:14
Updates DNS record of Digitalocean managed domain
#!/bin/bash
API_KEY="ALLWORKANDNOPLAYMAKESJACKADULLBOYALLWORKANDNOPLAYMAKESJACKADULLB"
RECORD_ID="66666666"
DOMAIN="example.com"
ADDR=$(curl http://ipecho.net/plain)
# To get record ID for $DOMAIN
#curl \
# -H "Authorization: Bearer $API_KEY" \
@floodkoff
floodkoff / git-gc-all.sh
Created November 17, 2014 09:23
Force git to get rid of all unreachable commits
git reflog expire --expire-unreachable=now --all && git gc --prune=now