This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/*.tif | |
*/*.jpg | |
*/*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LOGFILE=${1:-/var/log/iperf3.log} | |
killall iperf3 2>/dev/null | |
nohup iperf3 --server >>"${LOGFILE}" 2>&1 & | |
ps -A | grep iperf3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL=$1 | |
DIR=$2 | |
# Download a website | |
wget --show-progress --recursive --convert-links --page-requisites --no-parent \ | |
--user-agent="User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" \ | |
−−directory−prefix="$DIR" \ | |
"$URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html | |
# exec 4>&2 3>&1 2>&1 1>>$0.log | |
find . -regex '.*\.mp3$' -exec bash -c 'echo "{}" && lame --nohist --mp3input -V4 --vbr-new "{}" && rm "{}" && mv "{}.mp3" "{}"' \; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Patch for error message: | |
# ssh_sandbox_child: sandbox_init: @PREFIX@/share/openssh/org.openssh.sshd.sb: profile not found [preauth] | |
# | |
# Fix based on https://github.com/Homebrew/homebrew-dupes/issues/641 | |
# | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROUTER="ncat --sh-exec 'ncat $(sudo route -n get default -interface utun0 | sed -nre 's/.*?gateway: (.*?)$/\1/p') 7200' \ | |
--wait 30 \ | |
--output ncat-forward-tcp.dump \ | |
--verbose \ | |
--listen 10020 " | |
pids="" | |
CMD=$(echo ${ROUTER}{'& ; pids="$pids $!"; ','--udp & ; pids="$pids $!"; '}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set +x | |
wget http://www.squid-cache.org/Versions/v4/squid-4.0.13.tar.gz | |
tar -xvzf squid* | |
cd squid* | |
prefix=/usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set +x | |
#wget http://www.squid-cache.org/Versions/v4/squid-4.0.13.tar.gz | |
#tar -xvzf squid* | |
#cd squid* | |
prefix=/usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# activate debugging | |
#set -x | |
# fail on any errors | |
set -e | |
# OSX | |
tac <(sudo killall -SIGUSR1 dnsmasq && tac /usr/local/var/log/dnsmasq/dnsmasq.log | grep -m1 -B1000 ": time ") |