nar webapp howto
Create a fully self-contained executable of a web application with an embedded HTTP server using nar
Install nar
as global package (you must have node.js
already installed in your system)
$ npm install -g nar
function MyClass(/* dynamic constructor arguments, meta-programming rules! */) {} | |
MyClass.prototype.method = function () {} | |
MyClass.create = function () { | |
var instance = Object.create(MyClass.prototype) | |
MyClass.apply(instance, arguments) | |
return instance | |
} |
default: | |
attributes: | |
index: 1 | |
dployr: | |
attributes: | |
name: "dployr" | |
prefix: dev | |
private_key_path: ~/pems/cert.pem | |
username: john |
Create a fully self-contained executable of a web application with an embedded HTTP server using nar
Install nar
as global package (you must have node.js
already installed in your system)
$ npm install -g nar
function uuid() { | |
var uuid = "", i, random; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i == 8 || i == 12 || i == 16 || i == 20) uuid += "-" | |
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16) | |
} | |
return uuid | |
} |
function base64UTF8Decode(str) { | |
return unescape(decodeURIComponent(window.atob(str))) | |
} |
(function (global) { | |
'use strict'; | |
/*\ | |
|*| | |
|*| Base64 / binary data / UTF-8 strings utilities | |
|*| | |
|*| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding | |
|*| | |
\*/ |
{ | |
"node": true, | |
"browser": false, | |
"esnext": true, | |
"bitwise": true, | |
"camelcase": true, | |
"curly": true, | |
"eqeqeq": true, | |
"immed": true, | |
"indent": 2, |
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-libogg |
package bimg | |
import ( | |
"github.com/dustin/go-humanize" | |
. "github.com/tj/go-debug" | |
"runtime" | |
"strconv" | |
"time" | |
) |