Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| <?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. |
| # Add correct content-type for fonts | |
| AddType application/vnd.ms-fontobject .eot | |
| AddType font/ttf .ttf | |
| AddType font/otf .otf | |
| AddType font/x-woff .woff | |
| AddType image/svg+xml .svg | |
| # Compress compressible fonts | |
| AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml |
| // I mean, seriously, localStorage is supported even by your mum. How about instead of | |
| // casing the feature out, you give users in-memory (stale) storage instead? | |
| // If they close your application, they deserve to lose data anyway. | |
| // if (!('localStorage' in window)) { | |
| if (!Modernizr.localstorage) { | |
| window.localStorage = { | |
| _data : {}, | |
| setItem : function(id, val) { return this._data[id] = String(val); }, | |
| getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, |
| #!/usr/bin/env python | |
| from pypodio2 import api | |
| import sys, shutil, os, json | |
| c = api.OAuthClient(sys.argv[1],sys.argv[2], sys.argv[3], sys.argv[4]) | |
| orginfo = c.transport.get(url = '/org/') | |
| def writerawtext(filename, data): | |
| try: |
| <?php | |
| define('WYSIWYG_META_BOX_ID', 'my-editor'); | |
| define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different | |
| define('WYSIWYG_META_KEY', 'extra-content'); | |
| add_action('admin_init', 'wysiwyg_register_meta_box'); | |
| function wysiwyg_register_meta_box(){ | |
| add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); | |
| } |
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
| # Require any additional compass plugins here. | |
| # Set this to the root of your project when deployed: | |
| http_path = "/" | |
| css_dir = "css" | |
| sass_dir = "sass" | |
| images_dir = "img" | |
| javascripts_dir = "js" | |
| # You can select your preferred output style |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| <?php | |
| /* | |
| Plugin Name: Rewrite Rule Tutorials | |
| */ | |
| add_action( 'init', 'pmg_rewrite_add_rewrites' ); | |
| function pmg_rewrite_add_rewrites() | |
| { | |
| add_rewrite_endpoint( 'json', EP_PERMALINK ); | |
| add_rewrite_rule( |
| (function ($) | |
| { | |
| var superBind = $.fn.bind; | |
| var superUnbind = $.fn.unbind; | |
| var touchHandlersKey = "clicktouchHandlers"; | |
| // override bind | |
| $.fn.bind = function () | |
| { | |
| var $window = $(window); |