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
var dateinput = $('input[type="date"]').dateinput({ | |
"onShow": function(event) { | |
var calendar = this.getCalendar(); | |
var conf = this.getConf(); | |
var classes = conf.css.off + ' ' + conf.css.disabled; | |
function disableWeekends() { | |
var weeks = calendar.find('.calweek'); | |
weeks.find('a:first, a:last').addClass(classes); | |
} | |
calendar.find('#calprev, #calnext').click(disableWeekends); |
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
# File: ~/.bash_profile | |
# source ~/.profile, if available | |
if [[ -r ~/.profile ]]; then | |
. ~/.profile | |
fi | |
# start agent and set environment variables, if needed | |
agent_started=0 | |
if ! env | grep -q SSH_AGENT_PID >/dev/null; then |
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
# stuff to add at end of ~/.bash_logout | |
if ((agent_started)); then | |
echo "Killing ssh agent" | |
ssh-agent -k | |
fi |
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 | |
/** | |
* @author Simon Holywell <[email protected]> | |
*/ | |
class LazyLoadingProxy { | |
/** | |
* Where the instance of the actual class is stored. | |
* @var $instance object | |
*/ | |
private $instance = null; |
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 | |
$dir = 'classes/'; | |
if (is_dir($dir)) { | |
if ($dh = opendir($dir)) { | |
while (($file = readdir($dh)) !== false) { | |
if($file != '.' && $file != '..' && !is_dir($dir.$file)){ | |
require_once($dir.$file); | |
} | |
} | |
closedir($dh); |
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
RewriteEngine on | |
RewriteBase / | |
# force url to lowercase | |
RewriteCond %{REQUEST_URI} [A-Z] | |
# ensure it is not a file on the drive first | |
RewriteCond %{REQUEST_FILENAME} !-s | |
RewriteRule (.*) rewrite-strtolower.php?rewrite-strtolower-url=$1 [QSA,L] |
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
# This file is /etc/apache2/httpd.conf | |
# This file is automatically included by Ubuntu in /etc/apache2/apache2.conf | |
Include /etc/apache2/dev-server.conf |
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 | |
namespace Treffynnon; | |
/** | |
* A PHP class to access a PHP array via dot notation | |
* (Agavi http://www.agavi.org was the inspiration). | |
* | |
* This was hacked in to an existing codebase hence the | |
* global config array variable. |
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
if($.browser.mozilla) { | |
$("form").attr("autocomplete", "off"); | |
} |
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 | |
$article['full_text'] = preg_replace('/^([\<\sa-z\d\/\>]*)(([a-z\&\;]+)|([\"\'\w]))/', '$1<span class="drop-cap">$2</span>', $article['full_text']); |