This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
<?php | |
$posts = new posts_loop(); | |
foreach( $posts as $id => $post ) { | |
the_title(); | |
// etc... | |
} | |
// put this below in your functions.php: |
<?php | |
// with the above we can now do things like this: | |
foreach ( posts_loop() as $p ) { | |
get_template_part( 'content', 'page' ); | |
comments_template( '', true ); | |
} | |
// put this below in your functions.php: |
#!/bin/bash | |
# Run php files in the repo through phpcs, opting for a subset of only checking staged or modified files | |
# By @westonruter | |
status_filter='^.M' | |
status_filter_description="Linting modified files only" | |
while getopts ":sa" opt; do | |
case $opt in | |
s) |
<?php | |
namespace Rarst\GitHub\Gist; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Command\Guzzle\Description; | |
use GuzzleHttp\Command\Guzzle\GuzzleClient; | |
/** | |
* Build Gist comments feed for specific user, using GitHub API. |
<?php | |
/* Faux Google Maps oEmbed | |
* Embed google maps in a nicer iframe without using their provided embed code | |
* @usage Paste a Google Maps link in your post and it will be replaced with an iframe when published | |
* @link http://bigsaturday.net/oembed-google-maps-wordpress/ | |
*/ | |
wp_embed_register_handler( 'google_map', '#https://maps\.google\.com/maps(.*)#i', 'embed_google_map' ); | |
function embed_google_map( $matches ) { | |
$query = parse_url($matches[0]); |
*/5 * * * * /home/pi/pinger/pinger.sh > /dev/null 2>&1 |
This quick start guide is geared towards installing PHPUnit on OSX in order to run the WordPress unit tests. It uses homebrew to install PHP using homebrew-php. You can likely skip this step if you've already got php and pear installed properly.
If you use MAMP, then try these instructions to use MAMP's php and pear to install PHPUnit.
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
## give me a list of files from the month of May 2011 | |
ls -laht --color=never | egrep 'May[ ]+[0-9]+[ ]+2011(.*)' | sed 's/.*2011 / /' | |
## move them to a separate directory | |
mkdir may-2011; ls -laht --color=never | egrep 'May[ ]+[0-9]+[ ]+2011(.*)' | sed 's/.*2011 / /' | xargs -I {} mv {} may-2011/ |
// 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 | |
*/ |