Resources for learning web design & front-end development:
ONLINE
Design
| /** | |
| * loadJSONP( url, hollaback [, context] ) -> Null | |
| * - url (String): URL to data resource. | |
| * - hollaback (Function): Function to call when data is successfully loaded, | |
| * it receives one argument: the data. | |
| * - context (Object): Context to invoke the hollaback function in. | |
| * | |
| * Load external data through a JSONP interface. | |
| * | |
| * ### Examples |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
Resources for learning web design & front-end development:
ONLINE
Design
| <?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 |
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
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| // 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`. |
| <?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)#', |
git clone [email protected]: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