Skip to content

Instantly share code, notes, and snippets.

View euronay's full-sized avatar

James Naylor euronay

View GitHub Profile
@euronay
euronay / dump.lua
Created September 30, 2019 21:28
Dump a lua table
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
@euronay
euronay / Program.cs
Created March 28, 2019 13:11
Control WS2812B strip on a Raspberry Pi
using System;
using System.Device.Spi;
using System.Device.Spi.Drivers;
using System.Drawing;
using Iot.Device.Graphics;
using Iot.Device.Ws28xx;
namespace hello_ws2812
{
class Program