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 | |
# Input: list of domains (without 'http://' or trailing '/') | |
for i in `cat $1`; do | |
response=`curl -s http://www.doesitusecloudflare.com/?url=$i | grep "the website uses cloudflare"` | |
if [ "$response" ]; then | |
echo "$i: uses Cloudflare!" | |
#else | |
# echo "$i: OK" |
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 | |
# try to pull in a new quote from quotedb.com | |
newquote=`curl -s http://www.quotedb.com/quote/quote.php?action=random_quote` | |
# did it succeed? | |
if [ $? -eq 0 ]; then | |
# ok, curl was able to pull in a new quote. Parse and cache it | |
echo $newquote | sed "s/^document.write('\(.*\)<br>.*<a.*>\(.*\)<\/a.*;$/\"\1\" - \2/" > ~/.qotd | |
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 | |
ext_ip=`/usr/bin/curl --silent http://checkip.dyndns.org | awk '{printf $6}' | cut -f 1 -d "<" | tr -d 'n'` | |
echo $ext_ip |
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 | |
if [ "$#" -ne 1 ]; then | |
echo "I need some text to print." | |
exit 1 | |
fi | |
for i in `ls /usr/local/Cellar/figlet/2.2.5/share/figlet/fonts/*.flf`; do | |
echo -e "==== $(basename $i) ====\n" | |
figlet -f $i $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
function brewup () { | |
local BREW_PWD=`pwd` | |
local BREW_PREFIX=`brew --prefix` | |
local BREW_TAPS=$BREW_PREFIX/Library/taps | |
cd $BREW_PREFIX | |
echo "Update to latest git commit." | |
git checkout master | |
git fetch upstream | |
git merge upstream/master | |
git push origin master |