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 | |
runSpec(){ | |
local specTest="$1" | |
bundle exec rspec "${specTest}" > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo -n "." | |
else | |
echo -n "F" | |
echo "${specTest}" >> failed_individual_spec_tests.txt |
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 | |
DIR="/home/someone/somedir" | |
FILE="${1:?"First argument must be the filename name"}" | |
COUNT=1 | |
FILE_TO_TOUCH="${DIR}/${FILE}" | |
handleTrap(){ | |
echo -e "\n\nTouched '${FILE_TO_TOUCH}' ${COUNT} times." | |
exit 0 | |
} |
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
SCRIPT_DIR="$(readlink -f $(dirname $0))" | |
#or if must be supported on MAC | |
SCRIPT_DIR="$(cd "$(dirname "$0")"; 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
# see what process is using a port | |
sudo netstat -anp | |
# scan the ports | |
sudo nmap -sS -O 127.0.0.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
runUntilFails(){ | |
local cmd="${1:?"Must give a command as a string"}" | |
local count=0 | |
echo "Running cmd: ${cmd}" | |
while eval "${cmd} ; return $?"; do | |
((count+=1)) | |
echo "Try count: ${count}" | |
done | |
} |
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
cd /usr/local/lib/ruby/ | |
sudo mv ~/Downloads/RubyMine-7.1.1.tar.gz . | |
tar xzf RubyMine-7.1.1.tar.gz | |
sudo chown -R jwliechty:jwliechty RubyMine-7.1.1 | |
update-alternatives --list rubymine | |
sudo update-alternatives --install /usr/bin/mine rubymine /usr/local/lib/ruby/RubyMine-7.1.1/bin/rubymine.sh 1 | |
sudo update-alternatives --config rubymine | |
vi /home/jwliechty/.gnome2/panel2.d/default/launchers/mine-1.desktop |
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
DELETE FROM child WHERE id IN | |
( | |
SELECT child.id FROM child LEFT JOIN parent ON child.id=parent.child_id WHERE parent.child_id IS NULL | |
); |
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
SELECT dim.id FROM dim WHERE dim.id NOT IN | |
( | |
SELECT DISTINCT fact.dim_one_id FROM fact | |
) | |
AND dim.id NOT IN | |
( | |
SELECT DISTINCT fact.dim_two_id FROM fact | |
) | |
AND dim.id NOT IN | |
( |
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 -e | |
START_BRANCH="$1" | |
END_BRANCH="$2" | |
PATCH_TAR=patch.tar.gz | |
COMMIT_HASH_FILE=commit_hash | |
usage(){ | |
echo "" | |
echo "USAGE: $0 START 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
# install tools for working with RPMs | |
sudo yum groupinstall "Development Tools" | |
sudo yum install rpmlint rpmdevtools yum-utils | |
# add a Centos source repository | |
cat <<EOF | sudo tee /etc/yum.repos.d/srpm.repo >/dev/null | |
[centos-source] | |
name=Centos Vault $releasever - $basearch - Source | |
baseurl=http://vault.centos.org/6.3/os/Source | |
enabled=1 |
OlderNewer