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
mysql -u wp -p wp -e "drop database wptests; create database wptests;" |
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
## On Windows: | |
``http://www.graphicsmagick.org/INSTALL-windows.html`` | |
## On the Mac: | |
``brew install graphicsmagick`` | |
## On the Joyent box: | |
``` |
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
/** | |
* Be sure to include library scripts in this order. Can be placed either | |
* in the header or footer. | |
*/ | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script> |
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 | |
// Vendor includes | |
include $config->base_path . '/libraries/Vendor/autoload.php'; | |
// Include configuration file | |
$config = include('../config.php'); | |
// Create IoC container | |
$ioc = new \Illuminate\Container\Container; |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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: Time Shortcode | |
* Author: Otto | |
* | |
* Usage: [time]any-valid-time-string-here[/time] | |
* Will attempt to parse the time string and create a format that shows it in the viewers local time zone | |
* Note that times should be complete with year, month, day, and hour and minute.. something strtotime can parse meaningfully | |
* Conversion happens via Javascript and will depend on the users browser. | |
**/ |
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
// iframes | |
var $iframes = $( document.querySelectorAll( '.videos iframe' ) ); | |
function iframeSizing() { | |
var $this = $( this ), | |
width = $this.width(), | |
height = $this.height(), | |
containerWidth = $this.parent().width(), | |
heightRatio = height / width, | |
newHeight = heightRatio * containerWidth; |
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 | |
//where you want your thumbnails to go | |
$thumbs_dir = 'uploads/thumbs/'; | |
//this should be an array of video paths | |
$videos = array(); | |
if( $_POST["name"] ){ | |
// Grab the MIME type and the data with a regex for convenience | |
if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) { |
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 | |
/** | |
* Recursive argument parsing | |
* | |
* This acts like a multi-dimensional version of wp_parse_args() (minus | |
* the querystring parsing - you must pass arrays). | |
* | |
* Values from $a override those from $b; keys in $b that don't exist | |
* in $a are passed through. |
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 | |
/** | |
* Provide functionality to register new Archive Elements | |
*/ | |
/** | |
* Proposed generic field class to be used by the Settings API, Widgets, |