Skip to content

Instantly share code, notes, and snippets.

View frdmn's full-sized avatar
🦀

Jonas Friedmann frdmn

🦀
View GitHub Profile
@frdmn
frdmn / checker.sh
Last active September 30, 2015 10:28
El Capitan availability checker - read the installation instructions in the bash script below
#!/usr/bin/env bash
# Installation instructions:
# $ curl -s https://gist.githubusercontent.com/frdmn/c6700ade5a0fc906271f/raw/checker.sh > /usr/local/bin/osx-checker
# $ chmod +x /usr/local/bin/osx-checker
# $ osx-checker
URL="https://itunes.apple.com/search?entity=macSoftware&term=OS+X"
SEARCH_STRING="OS X El Capitan"
TIMEOUT_IN_SECONDS="60"
@frdmn
frdmn / dirty-git-check
Last active August 29, 2015 14:14
This script checks every 5 minutes if your working git repo has any changed content and if so, it'll "wall" a message to all connected Terminal shells.
#!/usr/bin/env bash
repodir="/opt/minecraft/mc-yeahwhat/plugins"
wallmsgprefix="[git] [plugin-configs]"
wallmsg="${wallmsgprefix} Caution: there are changes in \"${repodir}\" that are not tracked. Make sure to add and commit them!"
tempfile=$(mktemp /tmp/git-dirty_XXXXXXX)
####
echo ${wallmsg} > ${tempfile}
@frdmn
frdmn / gist:62cfef5eb9f7c4408440
Last active August 29, 2015 14:11
convert text file to-utf8 bash function
function 2utf8(){
local tmp=$(mktemp)
iconv -f ISO-8859-1 -t UTF-8 $1 > $tmp
if [ -f $tmp ]; then
mv "$tmp" "$1"
fi
}

Keybase proof

I hereby claim:

  • I am frdmn on github.
  • I am frdmn (https://keybase.io/frdmn) on keybase.
  • I have a public key whose fingerprint is 5920 54EF EE01 1552 6476 4EC9 B6E3 14FB D713 FC95

To claim this, I am signing this object:

@frdmn
frdmn / addVPN.scpt
Last active August 29, 2015 14:04
Add PPTP VPNs through AppleScript (OS X 10.9/10.10 support)
-- Moved to https://github.com/frdmn/PIA
@frdmn
frdmn / motd.sh
Last active August 29, 2015 13:56
Debian/Ubuntu version of ysaotome's AWS motd (https://gist.github.com/ysaotome/5997652)
#!/bin/bash
# Description: MOTD for Debian/Ubuntu
# 2013/07/15 @ysaotome
# 2014/05/29 @frdmn
BIN_DATE='/bin/date'
BIN_FIGLET='/usr/bin/figlet'
BIN_HOSTNAME='/bin/hostname'
BIN_IP='/sbin/ip'
BIN_GREP='/bin/grep'