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
* { | |
margin: 0; | |
} | |
html, body { | |
height: 100%; | |
} | |
.wrapper { | |
min-height: 100%; | |
height: auto !important; | |
height: 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
#content { overflow: hidden; width: 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
/bin/nice -n 19 mysqldump -e --user=DBUSER --password=DBPASS DATABASE | gzip | uuencode mysql_backup.gz | mail -s "Automatic mysql backup" your@email.com >/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
function sendXmlOverPost($url, $xml) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
// For xml, change the content-type. | |
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); |
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 mail_utf8($to, $subject = '(No subject)', $message = '', $header = '') { | |
$header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n"; | |
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ . $header); | |
} |
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 (isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_PW'])) { | |
$redirect_origin['auth_user'] = $HTTP_SERVER_VARS['PHP_AUTH_USER']; | |
$redirect_origin['auth_pw'] = $HTTP_SERVER_VARS['PHP_AUTH_PW']; | |
} |
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 | |
mysql_connect(localhost,'USER','PASS'); | |
@mysql_select_db('DATABASE') or die( "Unable to select database"); | |
$sql = 'SELECT customers_email_address FROM customers'; | |
$result = mysql_query($sql); | |
while($row = mysql_fetch_array($result)) { |
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 | |
#This script will change all the table engine types for a given database! | |
#All the DB tools I have (GNU/freeware) will not change a list of database | |
# types, so this script saves time when a CMS or other populates a database | |
# with tables we cannot use! This can be migrated to InnoDB by changing line | |
# 23, col 46 from MyISAM to InnoDB (double check the capitals there!). | |
# Change these variables relative: serverName, userName, password, databaseName | |
# 20051410 JLynch | |
# myisamFixer.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
# FOR MAINTENANCE ONLY | |
Options +FollowSymlinks | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !/maintenange.html$ | |
RewriteCond %{REMOTE_HOST} !^000\.000\.000\.000 | |
RewriteRule $ /maintenance.html [R=302,L] | |
# REMOVE FOR MAINTENANCE ONLY |
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
Non-www to www | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L] | |
www to non-www | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L] |
NewerOlder