A Pen by Andrew Houle on CodePen.
A simple SASS mixin to center divs using absolute positioning and 50% transform.
A Pen by Andrew Houle on CodePen.
##PHP Array Functions
array_diff (arr1, arr2 ...)
array_filter (arr, function)
array_flip (arr)
array_intersect (arr1, arr2 ...)
##Theme Structure
| Template | Description |
|---|---|
| header.php | Header Section |
| index.php | Main Section |
| sidebar.php | Sidebar Section |
| single.php | Post Template |
| page.php | Page Template |
| comments.php | Comment Template |
- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
#MySQL Cheat Sheet
##Selecting a database: mysql> USE database;
##Listing databases: mysql> SHOW DATABASES;
##Listing tables in a db: mysql> SHOW TABLES;
This file contains hidden or 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 | |
| class Person { | |
| private $name; | |
| public function __construct($name) { | |
| $this->name = $name; | |
| } | |
| public function getName() { | |
| return $this->name; |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Template Site Plugin for example.com | |
| Description: Site specific plugin template for example.com, in this case we are creating a widget | |
| */ | |
| //////////////////////////////////////////// | |
| // Start Adding Functions Below this Line // | |
| //////////////////////////////////////////// | |
| /* self-closing shortcode */ |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Template Site Plugin for example.com | |
| Description: Site specific plugin template for example.com, in this case we are creating a widget | |
| */ | |
| //////////////////////////////////////////// | |
| // Start Adding Functions Below this Line // | |
| //////////////////////////////////////////// | |
| // Create a widget |
This file contains hidden or 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
| <!-- Start the Loop. --> | |
| <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
| <!-- Test if the current post is in category 3. --> | |
| <!-- If it is, the div box is given the CSS class "post-cat-three". --> | |
| <!-- Otherwise, the div box is given the CSS class "post". --> | |
| <?php if ( in_category( '3' ) ) : ?> | |
| <div class="post-cat-three"> | |
| <?php else : ?> |