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
#!/usr/local/bin/ruby | |
#Changelog: | |
#v1.2 | |
#Added the following options and functionality: | |
# -h: There's now a help screen to show you how to use the command | |
# -n: View current weather, a.k.a. the old output. | |
# -t: View the forecast for tomorrow. | |
#v1.1 | |
#We remove the unnecessary "stats" variable and merge it into one query. |
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 | |
#Create a list of all of the songs that need converting | |
SONGS=$(find . \( -iname "*.m4a" -or -iname "*.webm" -or -iname "*.mp4" \) -maxdepth 1 | cut -c3-) | |
#If there are no songs to convert, alert user. Else, start looping through. | |
[[ -z $SONGS ]] && echo "Nothing here" || echo "$SONGS" | while read line | |
do | |
#We need to fix the original filename so that problem characters get escaped, has to be a better way. | |
fixed=$(echo $line | sed "s/ /\\\ /g; s/'/\\\'/g; s/,/\\\,/g; s/(/\\\(/g; s/)/\\\)/g; s/&/\\\&/g; s/\*/\\\*/g; s/\^/\\\^/g") |
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 | |
for website in $(awk --posix '/ServerName/ { if ( $2 !~ /([0-9]{1,3}\.){3}[0-9]+/ && $2 != ENVIRON["HOSTNAME"] && $2 !~ /^_wildcard_/ ) print $2 }' /etc/httpd/conf/httpd.conf) | |
do | |
((totalSites++)) | |
curl -s http://labs.sucuri.net/?is-my-wordpress-ddosing=$website | grep -q "Good: Your Website" | |
[ "$?" -ne "0" ] && badSites+=($website) || ((goodSites++)) | |
sleep 1 | |
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
#!/bin/bash | |
for website in $(awk --posix '/ServerName/ { if ( $2 !~ /([0-9]{1,3}\.){3}[0-9]+/ && $2 !~ ENVIRON["HOSTNAME"] && $2 !~ /^_wildcard_/ ) print $2 }' /etc/httpd/conf/httpd.conf) | |
do | |
((totalSites++)) | |
curl -s http://labs.sucuri.net/?is-my-wordpress-ddosing=$website | grep -q "Good: Your Website" | |
[ "$?" -ne "0" ] && badSites+=($website) || ((goodSites++)) | |
sleep 1 | |
done |