Skip to content

Instantly share code, notes, and snippets.

View cbrake's full-sized avatar

Cliff Brake cbrake

View GitHub Profile
@cbrake
cbrake / 99-usb-serial.rules
Created December 19, 2012 14:47
USB Serial udev rules
# /etc/udev/rules.d/99-usb-serial.rules
# udevadm info --attribute-walk -n /dev/ttyUSB0 |grep serial (can be used to get serial number)
# udevadm control --reload-rules (reload rules)
# udevadm trigger (re-add all devices)
# see https://wiki.archlinux.org/index.php/Bus_pirate
# for some reason, ATTRS{bInterfaceNumber}=="00" is not working, hence the use of ENV{}
# single USB/serial adapters
SUBSYSTEM=="tty", ATTRS{serial}=="A900TUKZ", SYMLINK+="ttyUSB_bub_1"
SUBSYSTEM=="tty", ATTRS{serial}=="A700fdWb", SYMLINK+="ttyUSB_bub_2"
@cbrake
cbrake / gist:5092651
Last active March 4, 2022 14:35
systemd network hotplugging
DESCRIPTION = "Network Hotplug"
LICENSE = "CLOSED"
PR = "r1"
SRC_URI = " \
file://network@.service \
file://network.rules \
"
@cbrake
cbrake / SketchSystems.spec
Last active July 15, 2020 21:05
Z Alerts
Z Alerts
Inactive*
all cond met -> Last Action Active and less 30m since last action?
Action
all cond met-> Active
not all cond met -> Inactive
Active
any cond not met -> Check Repeat Limit?
30m since last action -> Action
Check Repeat Limit?
Sketch 2
First State
some event -> Second State
Second State
@cbrake
cbrake / SketchSystems.spec
Last active July 15, 2020 20:09
Powered*
Powered*
power failed -> Red On
Green
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green
Unpowered
@cbrake
cbrake / SketchSystems.spec
Last active July 15, 2020 20:08
Powered*
Powered*
power failed -> Red On
Green
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green
Unpowered
@cbrake
cbrake / SketchSystems.spec
Last active July 15, 2020 20:08
Powered*
Powered*
power failed -> Red On
Green
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green
Unpowered
@cbrake
cbrake / keybase.md
Created November 13, 2017 20:57
keybase.md

Keybase proof

I hereby claim:

  • I am cbrake on github.
  • I am cbrake (https://keybase.io/cbrake) on keybase.
  • I have a public key ASBZOtALNM5H4CyxpzaZYhofjWv_xZCEOuWzKXE2ijjhFwo

To claim this, I am signing this object:

@cbrake
cbrake / gist:9e80e7b8ad51a704b5ab314a57694e28
Created July 7, 2017 19:54
devtool workspace with patches
commit 26da54a68b2c9415da84b27e3f402f822b767310 (HEAD -> devtool, tag: devtool-patched)
Author: Cliff Brake <cbrake@bec-systems.com>
Date: Thu Jul 6 18:16:59 2017 -0400
add okvc driver
%% original patch: 0001-add-okvc-driver.patch
commit 2f50a8580a23faea3108d6cc15a052983b047640 (tag: devtool-base, imx-rel_imx_4.1.15_2.0.0_ga-var02)
Author: Felix Radensky <felix.r@variscite.com>
@cbrake
cbrake / test-uloop.lua
Created November 4, 2015 20:15
libubox Interrupted system call
#!/usr/bin/env lua
-- the following will eventually fail on lua5.1 and luajit
-- with:
-- lua: test-uloop.lua:30: Interrupted system call
uloop = require 'uloop'
uloop.init()
local t