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 | |
/* | |
+----------------------------------------------+ | |
| | | |
| PHP apache log parser class | | |
| | | |
+----------------------------------------------+ | |
| Filename : apache-log-parser.php | | |
| Created : 21-Sep-05 23:28 GMT | | |
| Created By : Sam Clarke | |
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
# Set expires header and Remove ETags | |
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$"> | |
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" | |
Header unset ETag | |
FileETag None | |
</FilesMatch> | |
# Set cache-control header | |
<FilesMatch "\.(ico|jpg|png|gif)(\.gz)?$"> | |
Header set Cache-Control "public" |
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 | |
/** | |
* | |
* This is a quick way to turn a simple text file | |
* with a list of urls in a text file (sitemap-urls.txt) | |
* into a valid XML Sitemap: | |
* http://en.wikipedia.org/wiki/Sitemaps | |
* Put this file sitemap.xml.php and sitemap-urls.txt at | |
* the webroot http://example.com/sitemap.xml.php |
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
// definition of trackEvent method on a global object | |
$3N = { | |
trackEvent : function(category, action, label, value){ | |
if (typeof(pageTracker) == "object") pageTracker._trackEvent(category, action, label, value); | |
else if(typeof(_gaq) == "object") _gaq.push(['_trackEvent', category, action, label, value]); | |
} | |
}; | |
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 | |
$options = getopt('p:'); | |
$prefix = empty($options['p']) | |
? realpath('.') | |
: realpath($options['p']); | |
if (empty($prefix)) { | |
die("Bad prefix. Try again.\n"); | |
} |
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
/** | |
* Analytics Helper | |
* | |
* Include this script at the bottom of the body when you want to enable tracking outbound links. | |
* | |
* To enable outbound tracking, simply add rel="external" to your anchor. | |
* | |
* To enable event tracking, add rel="trackevent" to your anchor, then use the fragment | |
* identifier in the href to set your event params. An example href would look like: | |
* href="#te_category=Downloads&te_action=PDF&te_label=Document&te_value=Value" |
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
(function($) { | |
/* | |
A simple helper plugin for wrapping Google Analytic event tracking | |
into sites through jQuery and HTML5 data attributes. | |
This assumes that you have used the standard configuration provided | |
by google for setting up Google Analytics and used the _gaq var for | |
storing the tracker. | |
Can track focus, activate, hover and click input methods but not key |
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 | |
class pmgSeoAutoLinkerFront | |
{ | |
function __construct() | |
{ | |
add_filter( 'the_content', array( &$this, 'content' ), 1, 1 ); | |
} | |
function content( $content ) | |
{ |
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
SetEnv APPLICATION_ENV development | |
SetEnv DEBUG_FIREPHP enabled | |
# Access in PHP: | |
# // Define application environment | |
# defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); | |
# // Enable FirePHP for testing? | |
# defined('DEBUG_FIREPHP') || define('DEBUG_FIREPHP', (getenv('DEBUG_FIREPHP') ? getenv('DEBUG_FIREPHP') : 'disabled')); | |
Options All -Indexes | |
Options +FollowSymLinks |
OlderNewer