Milliseconds in your Timestamps.
We got 'em, you want 'em.
Shit needs to be PRECISE
MIT
| #!/usr/bin/env bash | |
| # This script installs PhantomJS on your Debian/Ubuntu System | |
| # | |
| # Taken from https://gist.github.com/julionc/7476620#gistcomment-2030572 and changed the download directory | |
| # | |
| # This script must be run as root: | |
| # sudo sh install_phantomjs.sh | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" 1>&2 |
| "use strict"; | |
| var stackTrace = (new Error()).stack; // Only tested in latest FF and Chrome | |
| var callerName = stackTrace.replace(/^Error\s+/, ''); // Sanitize Chrome | |
| callerName = callerName.split("\n")[1]; // 1st item is this, 2nd item is caller | |
| callerName = callerName.replace(/^\s+at Object./, ''); // Sanitize Chrome | |
| callerName = callerName.replace(/ \(.+\)$/, ''); // Sanitize Chrome | |
| callerName = callerName.replace(/\@.+/, ''); // Sanitize Firefox | |
| console.log(callerName) |
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
| // Ruby = 5.times { |i| puts i } | |
| // JS = (1).times(function(i){console.log(i);}) | |
| Number.prototype.times = function(cb) { | |
| var i = -1; | |
| while (++i < this) { | |
| cb(i); | |
| } | |
| return +this; |