To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
| /** | |
| * loadJSONP( url, hollaback [, context] ) -> Null | |
| * - url (String): URL to data resource. | |
| * - hollaback (Function): Function to call when data is successfully loaded, | |
| * it receives one argument: the data. | |
| * - context (Object): Context to invoke the hollaback function in. | |
| * | |
| * Load external data through a JSONP interface. | |
| * | |
| * ### Examples |
| <?php | |
| /** | |
| * A bunch of methods that can be used to aid the development and release of | |
| * an Application | |
| * | |
| * Copyright (c) 2010 Carl Sutton ( dogmatic69 ) | |
| * | |
| * @filesource | |
| * @copyright Copyright (c) 2010 Carl Sutton ( dogmatic69 ) | |
| * @link http://www.infinitas-cms.org |
| <?php | |
| /* | |
| This function saved my life. | |
| found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
| by: crvandyke | |
| It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
| */ | |
| $array = json_decode(json_encode($object), true); |
| <?php | |
| function longest_common_substring($words) | |
| { | |
| $words = array_map('strtolower', array_map('trim', $words)); | |
| $sort_by_strlen = create_function('$a, $b', 'if (strlen($a) == strlen($b)) { return strcmp($a, $b); } return (strlen($a) < strlen($b)) ? -1 : 1;'); | |
| usort($words, $sort_by_strlen); | |
| // We have to assume that each string has something in common with the first | |
| // string (post sort), we just need to figure out what the longest common | |
| // string is. If any string DOES NOT have something in common with the first | |
| // string, return false. |
| <!-- Paste it in your address bar --> | |
| data:text/html,<pre onkeyup="(function(d,t){d[t]('iframe')[0].contentDocument.body.innerHTML = d[t]('pre')[0].textContent;})(document,'getElementsByTagName')" style="width:100%;height:48%;white-space:pre-wrap;overflow:auto;" contenteditable></pre><iframe style="width:100%;height:48%"> |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Denis Ciccale <http://webdecs.wordpress.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| <?php | |
| /* | |
| Plugin Name: Custom-Post-Type Base | |
| Plugin URI: http://pmg.co/ | |
| Description: Dynamically change your custom post type slugs | |
| Version: n/a | |
| Author: Christopher Davis | |
| Author URI: http://pmg.co/people/chris | |
| License: GPL2/Creative Commons | |
| */ |
| <?php | |
| /** | |
| * Exactly the same as array_filter except this function | |
| * filters within multidimensional arrays | |
| * | |
| * @param array $array | |
| * @param callable|null $callback optional filter callback function | |
| * @param bool $remove_empty_arrays optional flag removal of empty arrays after filtering | |
| * |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh