Skip to content

Instantly share code, notes, and snippets.

View mikakaltoft's full-sized avatar

Mika Kaltoft mikakaltoft

View GitHub Profile
<?php
/*
Plugin Name: Dynamic WooCommerce Login
Description: This plugin enables a dynamic WooCommerce login feature. If the user is not logged in upon checkout, they are prompted to login or to register an account on the my-account page beforhand. If they have products in their cart they will be redirected to the checkout-page. If not, they will be redirected to the homepage.
Plugin URI: http://rocapress.com
Author: RocaPress
Author URI: http://rocapress.com
Version: 1.0
License: GPL2
*/
@mikakaltoft
mikakaltoft / audio-edit.php
Last active May 30, 2016 05:56 — forked from adriancarriger/audio-edit.php
Add an intro audio file to a list of audio files in PHP using SoX.
<?php
/* Make sure you have SoX installed.
* * Ubuntu install: `sudo apt-get install sox`
* * Mac install (using Homebrew): `brew install sox`
*/
$audio_intro = '/var/www/wp-content/uploads/audio-intro.mp3';
$audio_output_dir = '/var/www/wp-content/uploads/audio-output/';
$audio_files = array(
0 => array(
'id' => 1,