Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, |
| <?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. |
| <?php | |
| class PHPFatalError { | |
| public function setHandler() | |
| { | |
| register_shutdown_function('handleShutdown'); | |
| } | |
| } | |
| function handleShutdown() |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
| /** | |
| * Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation | |
| * and a couple other places I don't recall at the moment. This data is compatible with the Braintree | |
| * Payment API as of Dec 2011 | |
| * | |
| * Compiled by Steve Kamerman, 2011 | |
| */ | |
| SET FOREIGN_KEY_CHECKS=0; | |
| -- ---------------------------- |
| <?php | |
| /** | |
| * Premailer API PHP class | |
| * Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail | |
| * Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal | |
| * Premailer is owned by Dialect Communications group | |
| * @link http://premailer.dialect.ca/api | |
| * @author Marcus Bointon <[email protected]> | |
| */ | |
| Array functions: | |
| array_search $needle, $haystack | |
| in_array $needle, $haystack | |
| String functions: | |
| strchr $haystack, $needle | |
| stripos $haystack, $needle | |
| stristr $haystack, $needle | |
| strpos $haystack, $needle | |
| strrchr $haystack, $needle |
| <?php | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |