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
@floodkoff
floodkoff / sublime_cygwin.sh
Created May 27, 2013 09:21
I love Sublime Text and try to use it everyday everywhere. But is tricky to run it correctly under cygwin, because of it's paths. I use this shell script to run Sublime Text correctly from cygwin console. I usualy put this file in my HOME directory and run git config --global core.editor "~/sublime_cygwin.sh" to use it as git default text editor…
#!/bin/sh
"/cygdrive/d/programs/Sublime Text 2.0.1 x64/sublime_text.exe" -w -n "$(cygpath -w "$*")"