cat .git/HEAD | cut -c17-9999Useful if you are in docker and dont want to install git in your container :)
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "strconv" | |
| "strings" |
cat .git/HEAD | cut -c17-9999Useful if you are in docker and dont want to install git in your container :)
| <?php | |
| /** | |
| * The Bot. | |
| */ | |
| class Bot | |
| { | |
| const DIR_NORTH = 0; | |
| const DIR_EAST = 1; | |
| const DIR_SOUTH = 2; |
| <?php | |
| /* | |
| * QWERTY encode decode | |
| * | |
| * qwerty_encode maps English alphabets to their | |
| * position in qwerty layout keyboard like so: | |
| * a -> q, b -> w, c -> e ... etc | |
| * | |
| * qwerty_decode does the reverse |
| <?php | |
| /* | |
| * AJAX file upload with progress bar, as minimal as it can be. | |
| * If it doesnot work try latest version of web browser. | |
| */ | |
| // big file upload | |
| ini_set('memory_limit', '1G'); |
| #!/usr/bin/env php | |
| <?php | |
| /* | |
| * A simple php cli tool to traverse movie directories | |
| * and download the missing subtitles from subscene.com | |
| * (Especially suited for movies from yify torrents) | |
| * | |
| * Usage: php sub.php /path/to/movies/ | |
| * |
| <?php | |
| /** | |
| * Alternative prime number generator | |
| * | |
| * Generates first <n> prime numbers using | |
| * the prime numbers themselves | |
| * | |
| * @author Jitendra Adhikari <[email protected]> | |
| * |
| <?php | |
| /** | |
| * A helper function expand_array for PHP | |
| * | |
| * This is actually developed during the real need to develop JSON api | |
| * I wanted to have JSON api response spitted properly expanded (with semantic nodes) | |
| * But didnot want to do it by playing with arrays (looping, merging n' what not) time and again. | |
| * So, After fetching single dimensional array data from database, with keys having | |
| * some specific delimeter, this helper would do for me what i want to. |
| <?php | |
| /** | |
| * A str_ireplace_array for PHP | |
| * | |
| * Case insensitive version of str_replace_array | |
| * See https://wiki.php.net/rfc/cyclic-replace | |
| * | |
| * @author Jitendra Adhikari | adhocore <[email protected]> | |
| * |
| <?php | |
| /** | |
| * Obfuscator - The naive and trivial PHP Code obfuscator | deobfuscator | |
| * | |
| * generate() Generates a obfuscated string of given code | |
| * also gives the chunk value required by work() | |
| * work() Reverses the obfuscated string using chunk value given by generate() | |
| * to original code and then execute the code and returns response | |
| * |