Skip to content

Instantly share code, notes, and snippets.

@ganzuul
ganzuul / regis.sh
Last active September 1, 2018 22:24
ReGIS pm3d bash script
#!/bin/bash
#
# For reference:
# VT330/VT340 Programmer Reference Manual
# Volume 2: Graphics Programming
#
#
# This script plots vector graphics in the terminal emulator mlterm when mlterm is compiled with ./configure --with-tools
# The graph is generated by gnuplot compiled with ./configure --with-regis
#
@ganzuul
ganzuul / a.h
Created July 20, 2017 20:51
WIP UI for setting a large number e.g. a frequency using only clockwise and CCW movements of a rotary encoder. ESP8266 with Arduino SDK.
struct TwoNibbles
{
byte v1:4;
byte v2:4;
};
union Nibble
{
TwoNibbles nibble;
byte Nibble[sizeof(TwoNibbles)];
/*
Rotary Encoder - Polling Example
The circuit:
* encoder pin A to Arduino pin 2
* encoder pin B to Arduino pin 3
* encoder ground pin to ground (GND)
*/
#include <Arduino.h>
#include <U8g2lib.h>
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'com.tinkerpop.blueprints:blueprints-neo4j-graph:2.6.0',
'org.neo4j:neo4j-lucene-index:2.1.8',
@ganzuul
ganzuul / superquerio
Last active December 14, 2015 18:38
Get a message from an UDP-listener, send it onwards with socket.io
var express = require('express');
var io = require('socket.io');
var server = require('http');
var dgram = require("dgram");
var app = express()
, server = require('http').createServer(app)
, io = io.listen(server)
, server2 = dgram.createSocket("udp4");
app.use(express.static(__dirname + '/public'));
// Sensors begin here
var __device_sensors_service_entry = {
"name": null,
"version": null,
"proto": __device_sensors,
"descriptor": __device_sensors_descriptor,
"providers": [{
"descriptor": __sp_sensors_descriptor,
"instance": __sp_sensors_instance
}]