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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^0\.0\.0\.0 | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC] | |
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | |
RewriteRule .* /maintenance.html [R=302,L] | |
</IfModule> |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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 | |
define('E_FATAL', E_ERROR | E_USER_ERROR | E_PARSE | E_CORE_ERROR | | |
E_COMPILE_ERROR | E_RECOVERABLE_ERROR); | |
define('ENV', 'dev'); | |
//Custom error handling vars | |
define('DISPLAY_ERRORS', TRUE); | |
define('ERROR_REPORTING', E_ALL | E_STRICT); |
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
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^(.*)$ $1.php | |
# Return 404 if original request is .php | |
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$" | |
RewriteRule .* - [L,R=404] |
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
USER="" | |
PASS="" | |
HOST="" | |
wget -m -nH ftp://$USER:$PASS@$HOST/public_html/ -P public_html --cut-dirs=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
/** | |
* @param int $total Total number of records | |
* @param int $per_page How many records to display per page | |
* @param int $current_page Current page number | |
* @param string $link sprintf formatted string for page links $1 = page number | |
* @return string in html ul-li format | |
*/ | |
function pagination($total, $per_page, $current_page, $link) | |
{ | |
$boundry = 3; // How many pages to show around the current page |
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
$xl-down: "max-width: 9999px"; | |
$lg-down: "max-width: 1199px"; | |
$md-down: "max-width: 991px"; | |
$sm-down: "max-width: 767px"; | |
$xs-down: "max-width: 575px"; | |
$xl-up: "min-width: 1200px"; | |
$lg-up: "min-width: 992px"; | |
$md-up: "min-width: 768px"; | |
$sm-up: "min-width: 576px"; |
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 | |
require '_config.php'; | |
$twitteruser = 'webfwd'; | |
$tweetexpire = 60 * 30; // Seconds | |
$tweetfile = DOCROOT.'/twitter.txt'; | |
use Abraham\TwitterOAuth\TwitterOAuth; | |
if (!file_exists($tweetfile) || (time()-filemtime($tweetfile)) > $tweetexpire) { | |
$connection = new TwitterOAuth( |
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
body { | |
-webkit-font-smoothing: antialiased; | |
-moz-font-smoothing: antialiased; | |
font-smoothing: antialiased; | |
text-rendering: optimizeLegibility; | |
-webkit-text-size-adjust: 100%; | |
} |