Interactive:
docker run -it <image> /bin/bash
# https://gist.github.com/mitchwongho/11266726
Keep it running:
| var socket; | |
| const socketMessageListener = (event) => { | |
| console.log(event.data); | |
| }; | |
| const socketOpenListener = (event) => { | |
| console.log('Connected'); | |
| socket.send('hello'); | |
| }; |
| const net = require("net"); | |
| var server = net.createServer(function (c) { | |
| var oldWrite = c.write; | |
| c.write = function(d) { | |
| if (!Buffer.isBuffer(d)) { | |
| d = new Buffer(d); | |
| } | |
| oldWrite.call(this, d); | |
| server.bytesSent += d.length; |
jQuery's $.getScript function is a quick and easy way to include external JavaScript files into a website. However, its default implimentation will not cache the script file for the client.
The following information describes how you can itilize cached versions of $.getScript
| id | value | |
|---|---|---|
| flare | ||
| flare.analytics | ||
| flare.analytics.cluster |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
Summary:
| const IterablePromise = (iterableArray, promiseExecutorFunction) => { | |
| return Promise.all( | |
| iterableArray.map((item, index) => { | |
| return new Promise((resolve, reject)=>{ | |
| promiseExecutorFunction(item, index, resolve, reject); | |
| }); | |
| }) | |
| ); | |
| }; |
| {url:'stun:stun01.sipphone.com'}, | |
| {url:'stun:stun.ekiga.net'}, | |
| {url:'stun:stun.fwdnet.net'}, | |
| {url:'stun:stun.ideasip.com'}, | |
| {url:'stun:stun.iptel.org'}, | |
| {url:'stun:stun.rixtelecom.se'}, | |
| {url:'stun:stun.schlund.de'}, | |
| {url:'stun:stun.l.google.com:19302'}, | |
| {url:'stun:stun1.l.google.com:19302'}, | |
| {url:'stun:stun2.l.google.com:19302'}, |
| # source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
| # A list of available STUN server. | |
| stun.l.google.com:19302 | |
| stun1.l.google.com:19302 | |
| stun2.l.google.com:19302 | |
| stun3.l.google.com:19302 | |
| stun4.l.google.com:19302 | |
| stun01.sipphone.com | |
| stun.ekiga.net |