A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
- Headers
- Links
- Bold
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Frédéric Grosshans, 19 January 2012 | |
| Nathan R. Yergler, 6 June 2010 | |
| This file does not contain sufficient creative expression to invoke | |
| assertion of copyright. No warranty is expressed or implied; use at | |
| your own risk. |
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
| <?php | |
| /* | |
| Plugin Name: WP_Rewrite endpoints demo | |
| Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
| Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
| Author: Jon Cave | |
| Author URI: http://joncave.co.uk/ | |
| */ | |
| function makeplugins_endpoints_add_endpoint() { |
| <?php /* | |
| ************************************************************************** | |
| Plugin Name: Custom Post Password Cookie Expiry Time | |
| Description: WordPress doesn't allow you to customize how long a post password cookie lasts. This plugin allows you to customize that value; | |
| Version: 1.0.0 | |
| Author: Alex Mills (Viper007Bond) | |
| Author URI: http://www.viper007bond.com/ |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
| */ | |
| $args = array( |
| <textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
| ... | |
| <textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
| ... | |
| <script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
| <script> | |
| // Hook up ACE editor to all textareas with data-editor attribute | |
| $(function () { |
| <!DOCTYPE html> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="robots" content="noodp, noydir" /> | |
| <link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
| <link rel="canonical" href="http://mysite.com/" /> | |
| <link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="author" content="Galenic"> | |
| <script src="js/jquery-1.9.1.js"></script> | |
| <script src="js/knockout-2.1.0.js"></script> | |
| <script src="js/Chart.js"></script> | |
| <link rel="stylesheet" href="pure-min.css"> |
| <?php | |
| /** | |
| * NOTE: This gist is very old. You might want to check out recent forks | |
| * like this one: https://github.com/Alexlytle/Wordpress_custom_route/blob/main/Wordpress_Custom_route.php | |
| * (thanks @Alexlytle) If you have an improvement to this gist, please | |
| * post a link in a comment for others who might benefit. Thanks! | |
| * | |
| * A class to create simple custom routes. | |
| * |
This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.
VirtualHostX is a convenient way to manage development sites, but not required.
brew update
brew install php56
brew install php56-mcrypt
brew install mysql