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
| This is a mac specific script to load a mod into minecraft. In the terminal, run: | |
| ./mc_modloader.sh ModName.zip. | |
| It will make a backup of your current minecraft jar, and attempt to merge the mod into it. |
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
| #This file lists a bunch of callbacks for file changed events. | |
| #@ /Users/raym/Sites/myon/includes/content/js/reader/player.3.2.js | |
| java -jar $HOME/Sites/myon/server/utils/rm/lib/yuicompressor-2.4.7.jar /Users/raym/Sites/myon/includes/content/js/reader/player.3.2.js -o /Users/raym/Sites/myon/includes/content/js/reader/player.min.3.2.js; | |
| echo "Hello world"; | |
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 calculate_line($x1, $y1, $x2, $y2, $dataset) { | |
| $m = ($y2 - $y1) / ($x2 - $x1); | |
| $b = ($y1 - $m * $x1); | |
| $total_diff = 0; | |
| foreach ($dataset as $inf) { | |
| list($x, $y) = $inf; | |
| $yl = $m * $x + $b; | |
| $diff[$x] = $yl - $y; | |
| $total_diff += abs($diff[$x]); |
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
| #!/usr/bin/php | |
| <?php | |
| chdir (dirname(__FILE__).'/../../'); | |
| $root = realpath(getcwd()).'/'; | |
| define('ESC', "\033"); | |
| function is_tty() { | |
| static $is_tty = null; | |
| if (is_null($is_tty)) { $is_tty = posix_isatty(STDOUT); } |
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 getParameters(method) { | |
| var sig = method.toString(); | |
| var matches = sig.match(/function\s*\((.*?)\)/); | |
| if (matches == null || ! matches.length) { | |
| return []; | |
| } | |
| return matches[1].split(/,\s*/); | |
| }; |
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 | |
| function generate_combinations($set, $max_depth = INF, $depth = 0) { | |
| if (! is_array($set)) { trigger_error("Give me an array plox"); } | |
| if (count($set) <= 1) { | |
| return array($set); | |
| } | |
| if ($depth >= $max_depth) { | |
| return array($set); | |
| } |
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
| var XReq = function(params) { | |
| this.init(params); | |
| this.perform(); | |
| } | |
| XReq.prototype = { | |
| 'init': function(params) { | |
| var members = { | |
| 'url':null, |
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 | |
| if (count($argv) < 2) { | |
| die("Please enter a filename"); | |
| } | |
| $filename = $argv[1]; | |
| $funcNameRegex = '(?P<func>[a-zA-Z0-9_$]+)'; | |
| $contents = file_get_contents($filename); |
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 | |
| class ShellItem { | |
| const SIZE_MODE_SCALE = 0; | |
| const SIZE_MODE_CONST = 1; | |
| private $width; | |
| private $height; | |
| private $width_mode; |
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 | |
| $is_shell_script = ! isset($_SERVER['REQUEST_URI']); | |
| $width = $height = $depth = 5; | |
| $hollow = false; | |
| if ($is_shell_script) { | |
| for ($i = 1; $i < $argc; $i++) { |