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
| <?php | |
| /** | |
| * @author Simon Holywell <treffynnon@php.net> | |
| */ | |
| 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
| # 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
| # 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
| 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
| # Install: | |
| # | |
| # On Mint 6 Fluxbox edition this file goes in /etc/X11/xorg.conf | |
| # On Mint 10 LXDE edition this file goes in /usr/share/X11/xorg.conf.d/20-screen.conf | |
| # This config will also work for versions of Ubuntu of course in /etc/X11/xorg.conf | |
| # | |
| # Don't forget to back up your original xorg.conf file before adding this one. | |
| # | |
| # You'll need to restart your machine to see the effect. |
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 | |
| /** | |
| * Some examples of how to use this prototype. I highly recommend that you use | |
| * the PHP PECL extension I wrote instead though. It is better in every way. | |
| * For more information see http://php.net/ssdeep and http://pecl.php.net/ssdeep | |
| */ | |
| // Get a hash via a supplied file path | |
| $SsDeep = new SsDeep(); | |
| $hash_string = $SsDeep->getHash($file); |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <!-- | |
| Vacant Modified - 1.7 | |
| Designed by Sam Stefan samstefan.co.uk | |
| Modified by Simon Holywell simonholywell.com | |
| --> |
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 http = require('http'); | |
| http.createServer(function (req, http_res) { | |
| http_res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| var response = ''; | |
| var cradle = require('cradle'); | |
| var connection = new(cradle.Connection)('https://subdomain.iriscouch.com', 443, { | |
| auth: { username: 'username', password: 'password' } | |
| }); |
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
| #!/usr/bin/env bash | |
| echo "This script will download and install the tumblr migration script" | |
| echo "script and its dependencies on Debian systems." | |
| echo " " | |
| read -p "Install dependencies from apt-get? [Yn] " | |
| if [ "$REPLY" == "" -o "$REPLY" == "y" -o "$REPLY" == "Y" ]; then | |
| echo "Installing the dependencies..." | |
| echo " " | |
| sudo apt-get install libxslt-dev libxml2-dev ruby rubygems pandoc |