Skip to content

Instantly share code, notes, and snippets.

@Hodgy
Hodgy / transfer.plugin.zsh
Created March 29, 2016 12:42
Modified version of the example for alias to https://transfer.sh/
transfer() {
if [ $# -eq 0 ]; then
echo "No arguments specified. Usage:\n\ttransfer /tmp/test.md";
return 1;
fi
tmpfile=$( mktemp -t transferXXX );
if tty -s; then
basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g');
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile;
else
@Hodgy
Hodgy / evil.sh
Last active February 6, 2019 14:12
!/bin/bash
mkdir -p ~/.evil/
echo 'osascript -e "set volume 4"' > ~/.evil/whisper.sh
echo 'say -v whisper "I am watching you"' >> ~/.evil/whisper.sh
chmod 755 ~/.evil/whisper.sh
crontab -l > ~/.evil/cron.tab
echo '15 * * * * ~/.evil/whisper.sh' >> ~/.evil/cron.tab
crontab ~/.evil/cron.tab

Keybase proof

I hereby claim:

  • I am hodgy on github.
  • I am tdc_hodgy (https://keybase.io/tdc_hodgy) on keybase.
  • I have a public key whose fingerprint is 170A 2F78 6A05 70BD 3260 968F F2D5 CD98 0B05 97C1

To claim this, I am signing this object:

@Hodgy
Hodgy / dokku-mysql-list-info.sh
Created April 26, 2017 22:11
list all the mysql containers, get the info about them, and print only the DSN for each one
dokku mysql:list | awk '!/NAME/{print $1}' | xargs -I % dokku mysql:info % | awk '/Dsn:/{print $2}'
plugins=(autojump brew colorize common-aliases composer docker docker-compose git git-extras grunt gulp laravel5 redis-cli copybuffer)