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 | |
osascript -e "tell application \"$1\" to quit" |
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 | |
# A UNIX / Linux shell script to backup mysql server database using rsnapshot utility. | |
# ------------------------------------------------------------------------- | |
# Copyright (c) 2007 Vivek Gite <vivek@nixcraft.com> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# ------------------------------------------------------------------------- | |
# This script is part of nixCraft shell script collection (NSSC) | |
# Visit http://bash.cyberciti.biz/ for more information. | |
# ------------------------------------------------------------------------- | |
# Tested under RHEL / Debian / CentOS / FreeBSD oses |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
type = cat-file -t | |
dump = cat-file -p | |
undo = reset --hard | |
new = !sh -c 'git log $1@{1}..$1@{0} "$@"' |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^.*koehn\.com$ | |
RewriteRule ^robots\.txt$ /robots-off.txt [L] | |
RewriteCond %{HTTP_HOST} !^.*koehn\.com$ | |
RewriteRule !^robots-off\.txt$ - [L,G] |
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 | |
CHECK_IP=`curl -m 30 http://checkip.dyndns.org/ 2> /dev/null` | |
if [ $? -ne 0 ] | |
then | |
echo Unable to get current IP address with curl >&2 | |
exit 100 | |
fi | |
echo $CHECK_IP | sed -e 's!.*: \(.*\)</body>.*!\1!' |
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 | |
CHECK_IP=`curl -6 -m 5 http://www.whatismyipv6.com/ 2> /dev/null | awk '/^[0-9a-f:]+<tr><td>/ { sub(/<.*/, "") }; { print $0 }' | egrep '^[0-9a-f:]+$'` | |
if [ $? -ne 0 ] | |
then | |
echo Unable to get current IP address with curl >&2 | |
exit 100 | |
fi | |
echo $CHECK_IP | sed -e 's!.*is \(.*\)</h1>.*!\1!' |
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 | |
echo ===================================== | |
echo `date` Backing up Documents | |
# The URL to your remote AFP server. You can test your URL using command-K in the Finder. | |
AFP_URL=afp://user:password@afp.server.com/Share | |
# The place where the AFP server is mounted. By default this will be in /Volumes someplace. | |
AFP_DIRECTORY=/Volumes/Share |
NewerOlder