Skip to content

Instantly share code, notes, and snippets.

@Beherith
Beherith / CUS_GL4.lua
Last active March 10, 2022 15:05 — forked from lhog/CUS_GL4.lua
so incremental works
function widget:GetInfo()
return {
name = "CUS GL4",
author = "ivand",
layer = 0,
enabled = true,
}
end
-- Beheriths notes
function widget:GetInfo()
return {
name = "Unitshapes Rendering",
version = "v0.2",
desc = "Unitshapes Rendering",
author = "ivand",
date = "2020",
license = "GPL",
layer = 0,
enabled = false,
@Beherith
Beherith / gfx_map_lights.lua
Created September 25, 2020 13:22
how to create lights
function widget:GetInfo()
return {
name = "MapLights",
desc = "Adds static lights to maps",
author = "Beherith",
date = "2020",
license = "GNU GPL, v2 or later",
layer = 5,
enabled = false,
}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Deferred rendering",
version = 3,
desc = "Collects and renders point and beam lights",
author = "beherith, aeonios",
date = "2015 Sept.",
@Beherith
Beherith / DCC_Monitor_nano.ino
Created February 26, 2020 14:41
DCC monitor for the arduino nano
#include <DCC_Decoder.h>
# uses library and example from: https://github.com/MynaBay/DCC_Decoder/tree/master/examples/DCC_Monitor
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Defines and structures
//
#define kDCC_INTERRUPT 3 //USES PIN 3 on a nano!
@Beherith
Beherith / DCC_Timing_tester_esp8266.ino
Created February 25, 2020 15:05
Test the timing of indivisual ones and zeros on the DCC protocol.
#include "ESP8266WiFi.h"
#include "WiFiClient.h"
const int baudrate = 250000;
const int dccpin = 0; //D3 on wemos board
int olddcc = 0;
unsigned long t = 0;
unsigned long lastchangeus = 0;
byte ones[16384];
byte zeros[16384];
@Beherith
Beherith / ParseFastQ.py
Created July 18, 2019 08:39 — forked from xguse/ParseFastQ.py
Simple Python FastQ Parser class
class ParseFastQ(object):
"""Returns a read-by-read fastQ parser analogous to file.readline()"""
def __init__(self,filePath,headerSymbols=['@','+']):
"""Returns a read-by-read fastQ parser analogous to file.readline().
Exmpl: parser.next()
-OR-
Its an iterator so you can do:
for rec in parser:
... do something with rec ...