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 | |
SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) | |
USER=charles | |
HOST=gould.dev | |
echo "Backing up nginx config..." | |
mkdir -p "${SCRIPT_DIR}/etc/nginx/" | |
rsync -azv ${USER}@${HOST}:/etc/nginx/ etc/nginx/ |
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 | |
CASSANDRA_IMAGE='cassandra' | |
CASSANDRA_VERSION='2.2.9' | |
CASSANDRA_CONTAINER="${CASSANDRA_IMAGE}-${CASSANDRA_VERSION}" | |
cassandraCreate() { | |
docker run -d -p 9042:9042 --name ${CASSANDRA_CONTAINER} ${CASSANDRA_IMAGE}:${CASSANDRA_VERSION} | |
} |
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 | |
HOSTNAME=${1:?Specify the hostname to run tcpdump on} | |
LOGFILE="/tmp/$HOSTNAME.tcpdump" | |
sudo tcpdump -i any host $HOSTNAME -w "$LOGFILE" |
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 | |
VM_NAME='ubuntu-64' | |
vmStart() { | |
# & (the first one) detaches the command from stdin. | |
# >/dev/null detaches the shell session from stdout and stderr. | |
# &disown removes the command from the shell's job list. | |
VBoxHeadless --startvm "${VM_NAME}" &>/dev/null &disown |
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 | |
# | |
# This hook rejects commit messages that do not have an issue tag. | |
# | |
COMMIT_MSG=`cat $1` | |
COMMIT_PREFIX="\[[A-Z]+-[0-9]+\][[:blank:]][A-Z]" | |
# The normal way to match regular expression doesn't work on msysGit? | |
# if [[ $COMMIT_MSG =~ $COMMIT_PREFIX ]]; then |