Recommendations from others are noted in (parentheses). The rest are my personal recommendations.
- The Pragmatic Programmer - Hunt & Thomas
Industry | ||
---|---|---|
Accounting | ||
Airlines/Aviation | ||
Alternative Dispute Resolution | ||
Alternative Medicine | ||
Animation | ||
Apparel/Fashion | ||
Architecture/Planning | ||
Arts/Crafts | ||
Automotive |
<?php | |
/* | |
Correct output escaping in php is ridiculously difficult. This class does not pretend to be perfect, but is an attempt for myself to do better than scattering htmlspecialchars all over my code. | |
This is basically a wrapper around basic functionality like htmlspecialchars. For better security, inspired on code from Twig, who inspired themselves on Zend who inspired themselves on ESAPI. Security notice: all of the above fail to escape the comma in javascript context. This class doesn't and it also provides you with a wrapper around HTML purifier. | |
This comment has some bits and bops of text to make the point. References: | |
http://blog.astrumfutura.com/2012/06/automatic-output-escaping-in-php-and-the-real-future-of-preventing-cross-site-scripting-xss/ | |
http://blog.astrumfutura.com/2012/03/a-hitchhikers-guide-to-cross-site-scripting-xss-in-php-part-1-how-not-to-use-htmlspecialchars-for-output-escaping/ |
#!/bin/bash | |
# | |
# WP Commandline Local Install, by Brian Richards (@rzen) | |
# | |
# Creates a new directory, downloads WordPress, creates a database, sets up wp-config, | |
# optionally empties wp-content, and deletes other misc files. This compliments my local | |
# dev setup, outlined here: http://rzen.net/development/local-develoment-in-osx/ | |
# | |
# Credit: | |
# Based on WPBuildr (https://github.com/AaronHolbrook/wpbuildr/). Props to Aaron Holbrook |
<?php | |
/** | |
* == About this Gist == | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings | |
* | |
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
* |
<table class="form-table"> | |
<tbody> | |
<tr> | |
<th> | |
<label for="szbl-person-email"> | |
Email Address: | |
</label> | |
</th> | |
<td> | |
<input type="email" id="szbl-person-email" name="szbl_person_email" value="<?php |
<?php | |
// include all PHP files in ./lib/ directory: | |
foreach ( glob( dirname( __FILE__ ) . '/lib/*.php' ) as $file ) | |
include $file; |
<?php | |
class Sizeable_Person | |
{ | |
const POST_TYPE_SLUG = 'szbl-person'; | |
public static $instance; | |
public static function init() | |
{ | |
if ( is_null( self::$instance ) ) |
<?php | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |