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
# Use | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/3c11f952fea778110cfdb73ec3b97d8b/raw/InstallProxyTunnelUbuntu.sh | bash -x | |
sudo apt-get -y install libssl-dev | |
git clone https://github.com/sirkkalap/proxytunnel.git | |
cd proxytunnel | |
make proxytunnel |
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/sh | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/f31998c57cc0c3b5fbd5b0b0ee7bbca2/raw/3665a4962caba46b2729e4b5b835503c98734ae2/git-lg.sh | sh - | |
git config --global alias.lg \ | |
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" |
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/sh | |
BASEDIR=$(cd $(dirname $0); /bin/pwd) | |
($BASEDIR/isodate && /usr/local/bin/brew update && /usr/local/bin/brew upgrade --all) >>$HOME/brew-update.log 2>& |
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 | |
while true; do | |
echo $(date +%FT%T%z) $(dig +noall +answer +stats ftp.example.com | tr '\n' ' ') | |
echo $(date +%FT%T%z) $(nslookup ftp.example.com 10.1.2.3 | tr '\n' ' ') | |
echo $(date +%FT%T%z) $(nslookup ftp.example.com 10.2.4.6 | tr '\n' ' ') | |
sleep 60 | |
done | |
#[sirkkalap@mymachine ~]$ nohup ./test_dns.sh & | |
#[1] 16406 | |
#[sirkkalap@mymachine ~]$ tail nohup.out |
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 | |
# Adopted from https://josephscott.org/archives/2011/10/timing-details-with-curl/ | |
# | |
url=${1:?usage "[nohup] curl-times.sh <url> [ <sleep=1> ]"} | |
sleep=${2:-1} | |
format=" time_namelookup: %{time_namelookup} time_connect: %{time_connect}, time_appconnect: %{time_appconnect}, time_pretransfer: %{time_pretransfer}, time_redirect: %{time_redirect}, time_starttransfer: %{time_starttransfer}, time_total: %{time_total}\n" | |
while true; do | |
echo -n $(date +%FT%T%z) | |
curl -w "${format}" -o /dev/null -s "$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/bash | |
SONAR_IMAGE=tpires/sonar #sonar:kirre | |
SONAR_MYSQL_IMAGE=tpires/sonar-mysql | |
# Start Sonar MySQL | |
if docker inspect smysql >/dev/null; then | |
if docker inspect --format="{{ .State.Running }}" smysql >/dev/null; then | |
echo "Sonar MySQL already running" | |
else | |
docker start smysql | |
fi |
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 # Fail fast | |
# Clean up last run artifacts | |
rm -rf private-repository temporary-repository mirror-repository public-repository | |
## Create empty repository representing the private repository | |
mkdir private-repository |
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/sh | |
WORK=${$1:-proj} | |
require() { | |
command -v $1 >/dev/null 2>&1 || { echo >&2 "I require $1 but it's not installed. Installing."; sudo $2; } | |
} | |
# Determine OS platform | |
UNAME=$(uname | tr "[:upper:]" "[:lower:]") |
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/sh | |
# OS X | |
chrome=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome | |
if [ -e $chrome ]; then | |
$chrome --app=https://company.hipchat.com/chat/lobby | |
else | |
echo $chrome is required but not found. | |
fi |
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/sh | |
BASEDIR=$(cd "$(dirname "$0")"; pwd) | |
echo $BASEDIR |