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
<?php | |
if(extension_loaded('zlib')){ | |
ob_start('ob_gzhandler'); | |
} | |
header ('content-type: text/css; charset: UTF-8'); | |
header ('cache-control: must-revalidate'); | |
$offset = 60 * 60; | |
$expire = 'expires: ' . gmdate ('D, d M Y H:i:s', time() + $offset) . ' GMT'; | |
header ($expire); | |
ob_start('compress'); |
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
# Removes the database | |
mysqladmin -u USERNAME -p drop DATABASE | |
# Recreates the database | |
mysqladmin -u USERNAME -p create DATABASE | |
# Restores the database | |
mysql -u USERNAME -p DATABASE < FILENAME.mysql |
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
mysqldump --add-drop-table -u db_username -p db_name > mybackup.sql |
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
/** | |
* Disable RSS feeds for Wordpress | |
*/ | |
function fb_disable_feed() { | |
wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') ); | |
} | |
add_action('do_feed', 'fb_disable_feed', 1); | |
add_action('do_feed_rdf', 'fb_disable_feed', 1); | |
add_action('do_feed_rss', 'fb_disable_feed', 1); |
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
UPDATE [table name] SET [table column] = REPLACE([table column],"[original string]","[new string]") |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<h3 id="keynotes">Keynotes</h3> | |
<ul class="none" id="speakers"> | |
<xsl:apply-templates /> | |
</ul> | |
</xsl:template> | |
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
<?php | |
$user =& JFactory::getUser(); | |
if ($user->get('guest') == 1) { | |
$headerstuff = $this->getHeadData(); | |
$headerstuff['scripts'] = array(); | |
$this->setHeadData($headerstuff); | |
} | |
?> |