Skip to content

Instantly share code, notes, and snippets.

View kodi's full-sized avatar

Dragan Bajcic kodi

View GitHub Profile
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var width = 700;
var height = 700;
var center = {x: width/2 , y: height/2};
var circleStroke = function(radius, x, y, strokeColor) {
ctx.strokeStyle = strokeColor;
ctx.beginPath();
ctx.arc(x, y, radius, 0, Math.PI * 2);
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
canvas.addEventListener("mousemove", function (e) {
findxy('move', e)
}, false);
canvas.addEventListener("mousedown", function (e) {
findxy('down', e)
}, false);
canvas.addEventListener("mouseup", function (e) {
@kodi
kodi / Readme.md
Created March 18, 2017 23:14 — forked from ChuckJHardy/Readme.md
ZeroMQ + Node.js + Socket.io + UI for sending message from Ruby to a Javascript UI running on Node.js

Install the following requirements:

brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq

Within the app directory run the following commands in different panes.

ruby worker.rb