git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // Maintain ratio mixin. Great for responsive grids, or videos. | |
| // https://gist.github.com/brianmcallister/2932463 | |
| // | |
| // $ratio - Ratio the element needs to maintain. | |
| // | |
| // Examples | |
| // | |
| // // A 16:9 ratio would look like this: | |
| // .element { | |
| // @include maintain-ratio(16 9); |
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| <?php | |
| add_filter( 'the_content', 'remove_empty_p', 20, 1 ); | |
| function remove_empty_p( $content ){ | |
| // clean up p tags around block elements | |
| $content = preg_replace( array( | |
| '#<p>\s*<(div|aside|section|article|header|footer)#', | |
| '#</(div|aside|section|article|header|footer)>\s*</p>#', | |
| '#</(div|aside|section|article|header|footer)>\s*<br ?/?>#', | |
| '#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#', | |
| '#<p>\s*</(div|aside|section|article|header|footer)#', |
| // NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
| { | |
| // Settings | |
| "passfail" : false, // Stop on first error. | |
| "maxerr" : 100, // Maximum error before stopping. | |
| // Predefined globals whom JSHint will ignore. | |
| "browser" : true, // Standard browser globals e.g. `window`, `document`. |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
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
| <?php | |
| /** | |
| * This code is intended to be added to your wp-config.php file just below the top comment block. | |
| * It should replace the existing define('DB_*') statements. You can add or remove sections | |
| * depending on the number of environments you intend to setup. You should change all values of | |
| * DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST for each environment, making them all distinct | |
| * for security purposes. | |
| */ | |
| // determine the current environment |
Resources for learning web design & front-end development:
ONLINE
Design