Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@stevehenderson
stevehenderson / nodered_green_red_light.json
Created October 12, 2020 21:38
nodered_green_red_light
[
{
"id": "a35b9d70.ae8be",
"type": "tab",
"label": "GREEN-RED DEMO",
"disabled": false,
"info": ""
},
{
"id": "ef262268.43b27",
@stevehenderson
stevehenderson / nodered_green_lab.json
Created October 12, 2020 21:11
RaspberryPi Green Lab
[
{
"id": "e8651431.f956e8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a645b11c.917fd",
@stevehenderson
stevehenderson / HOWTO.txt
Created October 5, 2019 19:29 — forked from mcm/HOWTO.txt
Use daemonlogger + VXLAN to create "software span"
**Only really tested on Ubuntu 16.04**
Requirements:
* Two Linux systems (one to send traffic, one to receive)
* Network connectivity over UDP 4789
Sender Setup
* Install daemonlogger (sudo apt install daemonlogger)
* Save systemd service config as /etc/systemd/system/[email protected] (replace X.X.X.X with IP of receiver)
* Reload systemd (sudo systemctl daemon-reload)
@stevehenderson
stevehenderson / posix-fun-time.R
Created October 16, 2017 18:30
POSIX Time Function example R
#Dude timeformat string important
as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S")
as.numeric(as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S"))
@stevehenderson
stevehenderson / map-roll.js
Last active September 27, 2017 02:03
A module for loading a map in regions
var WorldMap = (function () {
var map;
focusRegion = 0;
function rotateFocus() {
focusRegion++;
if(focusRegion>=areas.length) focusRegion=1;
public boolean firstLast6(int[] nums) {
if((nums[0]==6)||(nums[nums.length-1]==6) )
return true;
else
return false;
}
How to parse this with regex:
{"unit":"101","location_z":1.012054,"location_x":0.956146,"name":"Placer(Clodde)","location_y":-0.3787908,"html":"(unset)","label":"0","type":"1","affordance_id":"453450c6-6219-4dbd-bcb7-061f3472b619"}
test here: http://regexstorm.net/tester
GETS PAIRS
(\".+?\":.+?[,}])
GET SINGLES
Boot the Analyst Ubuntu VM
Open Advanced REST client in chrome
Send these examples
--------------
GET
http://192.168.125.129:7474/db/data/
--------------------
GET
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
//Other ideas
//http://stackoverflow.com/questions/23777076/get-variable-from-www-call-in-unity