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 | |
cd /tmp | |
wget http://timthumb.googlecode.com/svn/trunk/timthumb.php | |
cd /home | |
sudo find . -name timthumb.php | sudo xargs -i cp /tmp/timthumb.php {} | |
sudo find . -name thumb.php | sudo xargs -i cp /tmp/timthumb.php {} | |
sudo find . -name img.php | sudo xargs -i cp /tmp/timthumb.php {} | |
echo "done replacing Timthumb..pray we didn't mess anyone up" | |
rm /tmp/timthumb.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
#!/usr/bin/python | |
# | |
# Just change the three variables below and you are all set! | |
# @author Matthew A. Johnston (WarmWaffles) | |
# your user name | |
API_USERNAME = "username" | |
# your api key | |
API_KEY = "api-key" | |
# Load balancer Region |
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/zsh | |
#### This could use some error checking but it's a gist, not a full blown program :) | |
#### Vid Luther (vid@zippykid.com) | |
sudo easy_install lockfile | |
sudo easy_install netaddr | |
sudo easy_install eventlet | |
mkdir ~/tmp |
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 | |
/** | |
* Add a filter to stylesheet_uri, which appends a query string to it automagically. | |
*/ | |
add_filter('stylesheet_uri', 'zk_css_versioner'); | |
/** | |
* the goal of this method is to append a query string to the css url for the site. | |
* the query string currently is determined by the last time the css file was modified |
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
bash "setup_remi_repo" do | |
code <<-EOH | |
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm | |
EOH | |
end |
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
server { | |
listen 80; | |
server_name localhost; | |
root /var/www/html; | |
index index.html index.htm index.php; | |
location ~ \.php$ { | |
include global/php.defaults; |
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 | |
ini_set(display_errors,1); | |
echo "Hello"; | |
echo "<pre>"; | |
print_r($_SERVER); | |
echo "</pre> <hr />"; | |
echo date('Y'); | |
phpinfo(); | |
?> |
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
Hello<pre>Array | |
( | |
[USER] => apache | |
[HOME] => /var/www | |
[FCGI_ROLE] => RESPONDER | |
[QUERY_STRING] => | |
[REQUEST_METHOD] => GET | |
[CONTENT_TYPE] => | |
[CONTENT_LENGTH] => | |
[SCRIPT_NAME] => /test.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
try_files $uri =404; | |
#fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include fastcgi_params; | |
fastcgi_index index.php; | |
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; | |
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 | |
add_action( 'init', 'x_maintenance_mode' ); | |
function x_maintenance_mode() { | |
if ( defined( 'X_MAINTENANCE_MODE' ) && true === X_MAINTENANCE_MODE ) { | |
if ( is_super_admin() && is_admin() ) | |
return; | |
die( 'Site is currently under maintenance' ); |
OlderNewer