Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
There are two methods to use in order to flip CSS styles: interpolated properties and the flip() function.
padding-left
, margin-right
, border-right
, left
, etc.)flip()
should be used for all other properties<?php | |
function create_onetime_nonce( $action = -1 ) { | |
$time = time(); | |
$nonce = wp_create_nonce( $time . $action ); | |
set_transient( '_nonce_' . $time, 1, 60*60 ); // adjust the lifetime of the transient | |
return $nonce . '-' . $time; | |
} | |
function verify_onetime_nonce( $_nonce, $action = -1 ) { | |
@list( $nonce, $time ) = explode( '-', $_nonce ); |
I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.
<?php | |
/* | |
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits | |
Plugin URL: http://easydigitaldownloads.com/extension/ | |
Description: Limit the number of license activations permitted based on variable prices | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
<?php | |
/** | |
* Returns all unique meta key from user meta database | |
* | |
* @param no parameter right now | |
* @retun std Class | |
* @todo do what you do for each meta key. | |
*/ | |
function get_user_meta_key() { |
<?php | |
/* | |
* This is a PayPal IPN (Instant Payment Notification) broadcaster | |
* Since PayPal does not provide any straightforward way to add | |
* multiple IPN listeners we'll have to create a central IPN | |
* listener that will broadcast (or filter and dispatch) Instant | |
* Payment Notifications to different destinations (IPN listeners) | |
* | |
* http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/ | |
* |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |