Skip to content

Instantly share code, notes, and snippets.

@xemasiv
xemasiv / Ubuntu18Setup.md
Created July 8, 2018 17:31
Ubuntu18Setup.md

Installing nvm:

  1. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
  2. Restart terminal
  3. Install & use latest: nvm install node && nvm use node

Installing python 2:

sudo apt install python-minimal

@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 / ListComponentMap.js
Last active May 21, 2018 19:00
ListComponentMap
const ListComponentMap = L => C => M => Ch => (<div>{
( typeof L === 'number' ?
((L) => {
let arr = new Array(L);
for (let k = 0; k < arr.length; k++) (arr[k] = k + 1);
return arr; })(L)
: L )
.map((i, n) =>
<C key={n} {...typeof M === 'function' ? M(i, n) : M }>
{typeof Ch === 'function' ? Ch(i, n) : Ch}
@xemasiv
xemasiv / README.md
Last active May 9, 2018 17:31
packed-map
@xemasiv
xemasiv / HELPERS.md
Last active May 11, 2018 16:30
Helpers
@xemasiv
xemasiv / index.js
Created May 3, 2018 00:14
Notifications
var n = new Notification('Connected', { body: 'Well done mate'} );
setTimeout(() => n.close(), 3000);
Notification.permission;
Notification.requestPermission().then(console.log).catch(console.error);
// https://developer.mozilla.org/en-US/docs/Web/API/notification
@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;
}