Skip to content

Instantly share code, notes, and snippets.

View michax's full-sized avatar

Michal Kulinski michax

  • Poland
View GitHub Profile
@mokargas
mokargas / area-light.js
Last active September 5, 2017 02:25
A-Frame + Three.JS RectAreaLight
//This is now outdated. Please see: https://github.com/mokargas/aframe-area-light-component
/**
* A-Frame Wrapper for THREE.JS RectAreaLight
* @author Mo Kargas (DEVLAD) mo@devlad.com
*/
/* global AFRAME */

Git Cheat Sheet

Commands

Getting Started

git init

or

@jedi4ever
jedi4ever / broker.js
Last active October 1, 2021 13:39
xsub , xpub example in nodejs
var pubListener = 'tcp://127.0.0.1:5555';
var subListener = 'tcp://127.0.0.1:5556';
var hwm = 1000;
var verbose = 0;
// The xsub listener is where pubs connect to
var subSock = zmq.socket('xsub');
subSock.identity = 'subscriber' + process.pid;
subSock.bindSync(subListener);
@mutoo
mutoo / circumcircle.js
Last active November 17, 2022 15:54
a very fast algorithm for getting the circumcircle from a triangle - http://www.exaflop.org/docs/cgafaq/cga1.html#Subject 1.04
function circumcircle(a, b, c) {
this.a = a
this.b = b
this.c = c
var A = b.x - a.x,
B = b.y - a.y,
C = c.x - a.x,
D = c.y - a.y,
E = A * (a.x + b.x) + B * (a.y + b.y),