Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
| const ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/ | |
| const digits = /^\d\d\.|^\d\d\d\./g | |
| const local = /^127\.|^10\.|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-1]\.|^192\.168\./g | |
| const RTCPeerConnection = window.RTCPeerConnection | |
| || window.mozRTCPeerConnection || window.webkitRTCPeerConnection | |
| ipaddr(function(addr1){ | |
| console.log(addr1) | |
| setTimeout(function(){ |
| const days = [ 's', 'm', 't', 'w', 't', 'f', 's' ] | |
| const today = new Date(Date.now()) | |
| // calsz, for conducting hypertext markup language measurements | |
| const calsz = [ 0 ] | |
| // generate a calendar year | |
| const calendar = yr ( today.getFullYear() ) | |
| # FIX TRIGGER HAPPY COMMIT TO WRONG BRANCH: | |
| # ---------- | |
| git reset --soft HEAD^ | |
| git checkout branch | |
| git commit | |
| # DELETE TAG | |
| # ---------- | |
| git tag -d 12345 | |
| git push origin :refs/tags/12345 |
| //cc main.c $CFLAGS $LDFLAGS -ldill $opt/lib/libdsock.a -o server && ./server | |
| #include <libdill.h> | |
| #include <dsock.h> | |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> |
| function parseURL (url) { | |
| var div = document.createElement('div'); | |
| div.innerHTML = '<a></a>'; | |
| div.firstChild.href = url; // Ensure href is properly escaped | |
| div.innerHTML = div.innerHTML; // Run current innerHTML back through parser | |
| return div.firstChild.origin || '//' + div.firstChild.hostname; // or case is for IE | |
| } |
| const n = [ 'error', 'stdout', 'stderr' ] | |
| require('child_process').exec('ls -la', function output () { | |
| return [] | |
| .slice | |
| .call ( arguments ) // or do [].from(arguments) | |
| .reduce ( ( p, c, i ) => { | |
| if ( c ) | |
| console.log(`\n\n${n[i]}:\n\n${c}`) | |
| return p | |
| }, process.exit ) ( 0 ) |
| // $ npm i nanomsg browserify es6ify stylus | |
| // $ node bld | |
| const createWriteStream = require('fs').createWriteStream | |
| const readFileSync = require('fs').readFileSync | |
| const writeFile = require('fs').writeFile | |
| const resolve = require('path').resolve | |
| const browserify = require('browserify') | |
| const join = require('path').join | |
| const watch = require('fs').watch |
| /** | |
| * Readable Stream | |
| */ | |
| require('util').inherits( _rs, require('stream').Readable ); | |
| function _rs ( fn ) { | |
| this._read = function(){}; | |
| require('stream').Readable.call( this, { objectMode: true } ); | |
| } | |
| function rs ( fn ) { |