This file contains hidden or 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 | |
FILE_PATH=$1; | |
while([ -h "${FILE_PATH}" ]) do cd -P $(dirname "${FILE_PATH}"); FILE_PATH=$(readlink "${FILE_PATH}"); done | |
cd -P $(dirname "${FILE_PATH}") > /dev/null | |
echo $(pwd); |
This file contains hidden or 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 ! klist -s ; do | |
ERR=$( kinit 3>&2 2>&1 1>&3- ) | |
EC=$? | |
if [ $EC -ne 0 ] ; then | |
echo $ERR | |
if ( echo $ERR | grep -q "Cannot contact any KDC" ) ; then | |
exit 2 | |
fi |
This file contains hidden or 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 | |
function isLocalhost { | |
local TEST_IP=$(getent hosts $1 | cut -f1 -d\ | head -1) | |
local ALL_MY_IPS=$(ip addr | grep inet | grep -v link | cut -f2- -de | cut -f2 -d\ | cut -f1 -d/) | |
( echo $ALL_MY_IPS | grep -q $TEST_IP ) && return 0 | |
return 1 | |
} |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'json' | |
group :test do | |
gem 'minitest' | |
gem 'test-unit' | |
end |
This file contains hidden or 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 | |
[ -e /etc/profile.d/proxy.sh ] && source /etc/profile.d/proxy.sh | |
# Some defaults that may be overridden by command line | |
HEADLESS=false | |
CLEAN=false | |
# Execute getopt |
NewerOlder