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 | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |
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
| //Parse the GA Cookie | |
| function gaParseCookie() { | |
| if (isset($_COOKIE['_ga'])) { | |
| list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4); | |
| $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2); | |
| $cid = $contents['cid']; | |
| } else { | |
| $cid = gaGenerateUUID(); | |
| } | |
| return $cid; |
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 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 | |
| */ |
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
| 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); |
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
| #!/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 |
NewerOlder