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
for i in 01 02 03 04 05; do echo "${i}" && ssh web${i}.yourdomain.com '/usr/local/nginx/sbin/nginx -v'; done | |
# Output: | |
# 01 | |
# nginx version: nginx/1.0.11 | |
# 02 | |
# nginx version: nginx/1.0.11 | |
# 03 | |
# nginx version: nginx/1.0.11 |
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
Sometimes a certain theme won't allow CDN integration with a particular plugin. Here is a list of plugins you can try: | |
http://wordpress.org/extend/plugins/ossdl-cdn-off-linker/ | |
http://wordpress.org/extend/plugins/cdn-sync-tool/ | |
http://wordpress.org/extend/plugins/wordpress-cdn-rewrite/ | |
http://wordpress.org/extend/plugins/w3-total-cache/ | |
http://wordpress.org/extend/plugins/wp-super-cache/ |
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
mysql> update wp_database.wp_posts set post_content = replace(post_content,'find_this_string','replace_with_this_string'); |
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
# If a uri has spaces e.g. /all/files/preview-images/May/aws%20blocks.png | |
# Make sure you have $request_uri before $is_args$args or the file will 404 | |
proxy_pass http://$backend$request_uri$is_args$args; |
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
find /path/to/folder -size +1M -print0 | xargs -0 du -h | sort -nr |
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
#NetDNA API Sample Code - Python | |
#Version 1.0a | |
# Thanks to @sajal from TurboBytes.com for getting this script started | |
# Contributed: @jdorfman & the @netdna family | |
import oauth.oauth as oauth | |
import httplib2, json | |
import pprint | |
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
<?php | |
/* | |
* NetDNA API Command Line Utility - PHP | |
* Version 1.0a | |
*/ | |
// Get it here: https://raw.github.com/gist/2791330/64b7007ab9d4d4cbb77efd107bb45e16fc6c8cdf/OAuth.php | |
require_once("OAuth.php"); |
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
#crontab | |
@reboot /usr/local/bin/nagircbot -C -f /usr/local/nagios/var/status.dat -e -s irc.yourserver.com:9999 -p s3cur3|>@$$\/\/d -c \#channelname -n BotNickName -U UserName -I 900 > /dev/null 2>&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
$ yes >> foo.log #20 seconds or so | |
$ ll -h foo.log | |
-rw-rw-r-- 1 jdorfman jdorfman 666M May 25 15:09 foo.log # I swear that was the actual size of the file | |
$ pv foo.log |gzip > foo.log.gz | |
666MB 0:00:11 [57.4MB/s] [=====================================>] 100% |
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
<?php | |
// vim: foldmethod=marker | |
/* Generic exception class | |
*/ | |
class OAuthException extends Exception { | |
// pass | |
} | |
class OAuthConsumer { |