docker ps -q -a | xargs docker rm
-q prints only the container IDs
-a prints all containers
| /* modernizr-test.js | |
| * Daniel Ott | |
| * 3 March 2011 | |
| * Custom Tests using Modernizr's addTest API | |
| */ | |
| /* iOS | |
| * There may be times when we need a quick way to reference whether iOS is in play or not. | |
| * While a primative means, will be helpful for that. | |
| */ |
| http://codex.wordpress.org/Function_Reference/get_attached_audio | |
| http://codex.wordpress.org/Function_Reference/get_attached_video | |
| http://codex.wordpress.org/Function_Reference/get_attached_images | |
| http://codex.wordpress.org/Function_Reference/get_attached_image_srcs | |
| http://codex.wordpress.org/Function_Reference/get_content_media | |
| http://codex.wordpress.org/Function_Reference/get_content_audio | |
| http://codex.wordpress.org/Function_Reference/get_content_video | |
| http://codex.wordpress.org/Function_Reference/get_content_images | |
| http://codex.wordpress.org/Function_Reference/get_content_image | |
| http://codex.wordpress.org/Function_Reference/get_content_galleries |
| #!/bin/bash | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| #MSG=${1-'Deploying $DIR_NAME from GitHub'} | |
| #BRANCH=${2-'trunk'} | |
| MSG="Deploying $DIR_NAME from GitHub" | |
| BRANCH="trunk" | |
| DEST_DIR=~/svn/wordpress_plugins/$DIR_NAME/$BRANCH |
| { | |
| "dev-plugin":{ | |
| "mu_plugins":[ | |
| { | |
| "location":"https://github.com/norcross/airplane-mode.git" | |
| }, | |
| { | |
| "location":"https://github.com/explodybits/hookr-plugin/" | |
| } | |
| ], |
| # Upstream to abstract backend connection(s) for php | |
| upstream php { | |
| server unix:/tmp/php-cgi.socket; | |
| server 127.0.0.1:9000; | |
| } | |
| server { | |
| server_name example.com; | |
| root /var/www; |
| <?php | |
| spl_autoload_register( function ( $class ) { | |
| // project-specific namespace prefix | |
| $prefix = 'my_plugin\\'; | |
| // base directory for the namespace prefix | |
| $base_dir = __DIR__ . '/includes/'; |
| /* Delete revisions */ | |
| DELETE FROM wp_posts WHERE post_type = "revision"; | |
| /* Only use this if you no longer care about any of your current revisions! */ | |
| /* Delete trashed posts */ | |
| DELETE FROM wp_posts WHERE post_type = "trash"; | |
| /* Delete Jetpack Feedback Spam */ | |
| SELECT * FROM wp_posts WHERE wp_posts.post_type = "feedback" AND wp_posts.post_status= "spam"; |
| function invert(tree) { | |
| if (!tree instanceof Array || tree.length === 1) return tree; | |
| var ret = []; | |
| var inverted = tree.reverse(); | |
| for(var cur in inverted) { | |
| if(!inverted.hasOwnProperty(cur)) continue; | |
| ret.push(inverted[cur] instanceof Array ? invert(inverted[cur]) : inverted[cur]); | |
| } |
| <?php | |
| /** | |
| * just some file | |
| */ | |
| $a = 1; | |
| if ($a > 0) { | |
| $a += 2; | |
| print($a); |