Skip to content

Instantly share code, notes, and snippets.

@xemasiv
xemasiv / zeromq-vs-redis.md
Created July 8, 2018 13:31 — forked from hmartiro/zeromq-vs-redis.md
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@xemasiv
xemasiv / introrx.md
Created July 4, 2018 16:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@xemasiv
xemasiv / LICENSE.txt
Created June 11, 2018 00:16 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@xemasiv
xemasiv / BigMap.js
Created April 29, 2018 16:12 — forked from josephrocca/BigMap.js
BigMap - wrapper to get past the ~16 million key limit on JavaScript Maps
// only covers a small subset of the Map api!
// haven't debugged yet!
class BigMap {
constructor(iterable) {
if(iterable) throw new Error("haven't implemented construction with iterable yet");
this._maps = [new Map()];
this._perMapSizeLimit = 14000000;
this.size = 0;
}
@xemasiv
xemasiv / usage.md
Created April 9, 2018 21:29
initial netcode.io usage guide

netcode.io usage

netcode.io enables a client/server architecture, handling the client/server connection handshake and encrypting the traffic between them.

server setup

  1. create a server instance:
@xemasiv
xemasiv / stuns
Created April 8, 2018 21:36 — forked from zziuni/stuns
STUN server list
# 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
@xemasiv
xemasiv / stuns
Created April 8, 2018 21:35 — forked from yetithefoot/stuns
STUN+TURN servers list
{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'},

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

@xemasiv
xemasiv / README.md
Created March 5, 2018 08:29 — forked from steveosoule/README.md
jQuery.getScript Cached

jquery.getScriptCached.js

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

Usage

  1. Include jquery, if it's not already.
@xemasiv
xemasiv / bandwidth.js
Created December 15, 2017 12:51 — forked from mekwall/bandwidth.js
How to measure bandwidth of a server in Node.js (and some other statistics)
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;