Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |
| //addEventListener polyfill 1.0 / Eirik Backer / MIT Licence | |
| (function(win, doc){ | |
| if(win.addEventListener)return; //No need to polyfill | |
| function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}} | |
| function addEvent(on, fn, self){ | |
| return (self = this).attachEvent('on' + on, function(e){ | |
| var e = e || win.event; | |
| e.preventDefault = e.preventDefault || function(){e.returnValue = false} | |
| e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true} |
| function parseArguments() | |
| { | |
| array_shift($argv); | |
| $out = array(); | |
| foreach($argv as $arg) | |
| { | |
| if(substr($arg, 0, 2) == '--') | |
| { | |
| $eqPos = strpos($arg, '='); | |
| if($eqPos === false) |
| {# | |
| time can be any string acceptable by http://www.php.net/strtotime, the | |
| template will output that time's month. | |
| If you don't want to pass in a date you can set time like this: | |
| {% set time = "now"|date("U") %} | |
| {% set time = "December 2012"|date("U") %} | |
| How ever you want to output items onto the calendar is a different issue, | |
| but I'd assume pushing everything into an array numerically indexed by that day: |
| #include "base94.h" | |
| void base94_encode(const unsigned char *plain, unsigned char *code) { | |
| // high * 2^64 | low | |
| unsigned long long value | |
| = ((unsigned long long)plain[1] << 56) | ((unsigned long long)plain[2] << 48) | |
| | ((unsigned long long)plain[3] << 40) | ((unsigned long long)plain[4] << 32) |
| Array.prototype.selectMany = function (fn) { | |
| return this.map(fn).reduce(function (x, y) { return x.concat(y); }, []); | |
| }; | |
| // usage | |
| console.log([[1,2,3], [4,5,6]].selectMany(function (x) { return x; })); //[1,2,3,4,5,6] | |
| console.log([{ a: [1,2,3] }, { a: [4,5,6] }].selectMany(function (x) { return x.a; })); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86 | |
| call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64 |
| (def digits | |
| (seq (str "0123456789" | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| "abcdefghijklmnopqrstuvwxyz" | |
| ".-_~"))) | |
| (def radix (count digits)) | |
| (defn encode | |
| "Encodes Long to String." |
| #!/bin/bash | |
| ### NOTE ### You probably don't need this anymore! | |
| # Just set RUST_BACKTRACE=1 | |
| # Usage: rust-backtrace ./my-rust-prog args... | |
| exec gdb -batch -n -x /dev/fd/3 --args "$@" 3<<ENDGDB | |
| set height 0 | |
| set breakpoint pending on |