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
function get_partial($args) { | |
// If empty, return false | |
if (!isset($args['name'])) | |
return false; | |
// If file exists, include it | |
$filename = sprintf(TEMPLATEPATH . '/assets/partials/%s.php', $args['name']); | |
if (file_exists($filename)): | |
ob_start(); |
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 bash | |
echo "Checking to see if /Public/Shared Music/ is mounted ..." | |
if [[ -d /Volumes/Public/Shared\ Music/ ]]; then | |
echo "Begin rysync command ..." | |
rsync -vur --delete --exclude=*.db --exclude=*.info --exclude=.DS_Store ~/Music/iTunes/iTunes\ Music/Music/ /Volumes/Public/Shared\ Music | |
echo "Done!" | |
else | |
echo "ERROR! Remote drive not mounted." | |
fi |
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/sh | |
txtgrn=$(tput setaf 2) # Green | |
txtylw=$(tput setaf 3) # Yellow | |
txtblu=$(tput setaf 4) # Blue | |
txtpur=$(tput setaf 5) # Purple | |
txtcyn=$(tput setaf 6) # Cyan | |
txtwht=$(tput setaf 7) # White | |
txtrst=$(tput sgr0) # Text reset | |
cd /Library/WebServer/Documents |
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/sh | |
# Variables | |
DB_HOSTNAME=yourdbhost | |
DB_USERNAME=yourusername | |
DB_PASSWORD=yourpassword | |
SVNREP_PATH=path/to/repo/folder | |
BACKUP_PATH=path/to/save/backups | |
# ######### Database Backup ######### |
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
/** | |
* Auto convert hyperlinks in text | |
* | |
* @param string Text to filter | |
* @return string Filtered text | |
* @url http://www.php.net/manual/en/function.preg-replace.php#77787 | |
*/ | |
function filter_hyperlink($text) { | |
$text=preg_replace("/(http:\/\/|www|[a-zA-Z0-9-]+\.|[a-zA-Z0-9\.-]+@)(([a-zA-Z0-9-][a-zA-Z0-9-]+\.)+[a-zA-Z0-9-\.\/\_\?\%\#\&\=\;\~\!\(\)]+)/","<a href=\"http://\\1\\2\">\\1\\2</a>",$text); | |
$text=preg_replace("/(http:\/\/t\.co\/[a-zA-Z0-9-\.\/\_\?\%\#\&\=\;\~\!\(\)]+)/","<a href=\"http://\\1\\2\">\\1\\2</a>",$text); // Hack for twitter t.co links |
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 | |
// Config | |
define('POLLEN_THRESHOLD', 15); | |
define('EMAIL_RECIPIENT', '[email protected]'); | |
/* | |
0 to 5 Pollen Grains/cm = Slight | |
6 to 15 Pollen Grains/cm = Moderate | |
16 to 25 Pollen Grains/cm = Heavy |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
/* | |
Requires: | |
terminal-notifier - A ruby gem that talks to notification center | |
launchd/cron - to schedule `php /path/to/SVNStatus.php` to run. | |
*/ | |
// Config | |
$binary = '/path/to/bin/terminal-notifier'; |
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
// ==UserScript== | |
// @name PaywallHop | |
// @namespace gist.github.com/stephenyeargin/paywallhop | |
// @description Removes Paywall on select Gannet properties, namely the Tennessean. | |
// @include http://*.tennessean.com/* | |
// @version 1 | |
// ==/UserScript== | |
// Make sure jQuery is loaded | |
(function(){ |
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
# Description: | |
# Allows hubot to repeat what is in a private message (through IRC adapter) | |
# | |
# Dependencies: | |
# hubot-irc | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
OlderNewer