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| /** | |
| * Prevent update notification for plugin | |
| * http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
| * Place in theme functions.php or at bottom of wp-config.php | |
| */ | |
| function disable_plugin_updates( $value ) { | |
| if ( isset($value) && is_object($value) ) { | |
| if ( isset( $value->response['plugin-folder/plugin.php'] ) ) { | |
| unset( $value->response['plugin-folder/plugin.php'] ); | |
| } |
| ##################### | |
| # | |
| # Use this with or without the .gitattributes snippet with this Gist | |
| # create a fixle.sh file, paste this in and run it. | |
| # Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
| # This Gist normalizes handling by forcing everything to use Unix style. | |
| ##################### | |
| # Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
| // With $script variable | |
| $(document).ready(function() { | |
| $('script[type="text/javascript/defer"]').each(function() { | |
| var $script = $('<script type="text/javascript"/>').text($(this).clone().text()); | |
| $(this).after($script).remove(); | |
| }); | |
| }); | |
| // Without $script variable | |
| $(document).ready(function() { |
| <div><!-- social media share buttons --> | |
| <a href="http://www.facebook.com/" onclick="window.location = 'http://www.facebook.com/share.php?u=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/aLnZg.png" alt="Share on Facebook" border="0" /></a> | |
| <a href="http://twitter.com/" onclick="window.location = 'http://twitter.com/home/?status=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/oFrLG.png" alt="Tweet This" border="0" /></a> | |
| <a href="http://www.linkedin.com/" onclick="window.location = 'http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/mwHNU.png" alt="Share on LinkedIn" border="0" /></a> | |
| <a href="https://plus.google.com/" onclick="window.location = 'https://plus.google.com/share?url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/tzMMp.png" alt="Share on Google+" border="0" /></a> |
| <form action="." method="post"> | |
| <noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript> | |
| <input | |
| type="submit" | |
| value="Pay with Card" | |
| data-key="PUBLISHABLE STRIPE KEY" | |
| data-amount="500" | |
| data-currency="cad" | |
| data-name="Example Company Inc" |
| <?php | |
| /* usage: | |
| $db = new Database("mysql:host=" . Config::$dbHost . ";dbname=" . Config::$dbName . ";", Config::$dbName, Config::$dbUser, Config::$dbPass); | |
| $db->changeVersion("", "1", function ($tx) { | |
| $tx->executeSql("CREATE TABLE IF NOT EXISTS `examples` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `example` mediumtext, | |
| PRIMARY KEY (`id`) |
| <?php | |
| /* JSONP_Example.php | |
| * Author: Kevin Lanni | |
| * Description: Demonstrates how to create a simple public Web API using JSONP responses | |
| * This is useful for opening Web APIs for public use without the need for proxying or other SOP work-arounds. | |
| * This example does not demonstrate API keys or any other method of authentication. | |
| */ | |
| // Supply a header to set the proper expectation for the client browser | |
| header('Content-Type: application/json'); |
| <?php | |
| // Place this in your functions.php file | |
| add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url'); | |
| function wpcf7_custom_form_action_url(){ | |
| return 'send.php';// replace this with the new action url (excluding the 'http://') | |
| } | |
| ?> |