Skip to content

Instantly share code, notes, and snippets.

<?php
/*
* Plugin Name: Krogsgard enable main site forms and audio
* Plugin URI: http://infomedia.com/
* Description: enables a user to use audio and form shortcodes from the main site in sub sites with a wrapper shortcode
* Version: 0.1
* Author: Brian Krogsgard
* Author URI: http://krogsgard.com/
* Network: true
*/
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
#!/bin/bash
# Script inspired by https://gist.github.com/1025598
#### WARNING ####
#### Please be careful with this script. The use of eval $(find) is dangerous.
#### If a user can upload a file called wp-config.php anywhere onto your site,
#### they can probably execute arbitrary commands via this script.
#### You have been warned. GPL, no warranty.
# Inspired by http://stackoverflow.com/questions/7586995/read-variables-from-wp-config-php