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/env php | |
<?php | |
// This command simply prints out the serialized data in a readable printed array format | |
// Found on a blog via a google search | |
// @see http://top-frog.com/2009/08/28/quickly-unserialize-data-in-textmate/ | |
$data = unserialize(file_get_contents('php://stdin')); | |
print_r($data); |
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/env ruby | |
if ARGV.empty? | |
$stderr.puts <<-EOM | |
ExpressionEngine (1.x) MYSQL DUMP Localizer | |
1. Reads MYSQL DUMP of ExpressionEngine website from STDIN | |
2. Replaces ALL HOSTNAME & PATH data (config) with LOCAL SETTINGS | |
3. Output corrected MYSQL DYMP file. |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# non git dir: [email protected]:~/var/www: _ | |
# in git dir: [email protected]:~/var/www/site.tld (branchname): _ | |
PS1="\[\e[01;31m\]\u@\H:\w\$(parse_git_branch): \[\e[00m\]" |
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
<script type="text/javascript"> | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
</script> | |
{if segment_1 == "search" && segment_2 != ""} | |
<script type="text/javascript"> | |
try { | |
var pageTracker = _gat._getTracker("UA-000000-1"); | |
pageTracker._initData(); |
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 | |
/** | |
* Custom configuration bootstrap file for ExpressionEngine | |
* | |
* Place config.php in your site root | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php | |
* If you have moved your site root you'll need to update the require_once path | |
* |
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 | |
// Dynamic paths for cross-server compatibility | |
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://"; | |
$base_url = $protocol . $_SERVER['HTTP_HOST']; | |
$base_path = $_SERVER['DOCUMENT_ROOT']; | |
$system_folder = "system"; | |
$images_folder = "images"; | |
$images_path = $base_path . "/" . $images_folder; |
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 | |
// Dynamic paths for cross-server compatibility | |
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://"; | |
$base_url = $protocol . $_SERVER['HTTP_HOST']; | |
$base_path = $_SERVER['DOCUMENT_ROOT']; | |
$system_folder = "system"; | |
$images_folder = "images"; | |
$images_path = $base_path . "/" . $images_folder; |
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 | |
// Debugging and performance | |
$config['show_profiler'] = 'n'; # y/n | |
$config['template_debugging'] = 'n'; # y/n | |
$config['debug'] = '1'; # 0: no PHP/SQL errors shown. 1: Errors shown to Super Admins. 2: Errors shown to everyone. | |
$config['disable_all_tracking'] = 'y'; # y/n | |
$config['enable_sql_caching'] = 'n'; # Cache Dynamic Channel Queries? | |
$config['email_debug'] = 'n'; # y/n |
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 | |
/* | |
EE2 hidden configuration variables | |
Last updated: Jun 20 2010 | |
Obtain this list by putting print_r($this->EE->config->config); on a PHP-enabled template. | |
See: http://eeinsider.com/tips/view/config-overrides-for-ee-1-and-2/ | |
*/ |
OlderNewer