Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@darconeous
darconeous / coap-m2m-thoughts.md
Last active June 15, 2018 17:12
CoAP M2M Thoughts

CoAP M2M Thoughts

This is a set of loosely-organized notes about developing a flexible machine-to-machine protocol that uses CoAP.

The hope is to refine these thoughts into a standardized M2M protocol.

Pairing

@darconeous
darconeous / b2d-slow-fix.md
Created July 22, 2016 20:24
boot-to-docker slow download fix

Note to self:

docker-machine ssh default sudo /usr/local/sbin/tc qdisc add dev eth0 root netem delay 10ms

Undo:

docker-machine ssh default sudo /usr/local/sbin/tc qdisc change dev eth0 root netem delay 0ms

@darconeous
darconeous / congress-reimagined.txt
Created July 27, 2016 21:53
Congress Reimagined
Congress Reimagined
===================
This is a document which summarizes my thoughts on how congress could be organized differently
in order to allow for more than two viable political parties.
Senate
------
The senate would be changed quite dramatically. Instead of each state voting for two
@darconeous
darconeous / syslog-ng.conf
Last active September 17, 2016 21:57
syslog-ng automatic reboot upon USB failure
# These next three lines monitor the log for indications
# that the USB device has gotten into a bad state. When we
# notice that the USB device is in a bad state, we want to
# reboot. However, in order to avoid reboot loops, we only
# allow a reboot to occur if the system has been up for
# longer than 5 minutes. -- RQ 2016-09-17
filter f_usbfail { program("pcscd") and match("LIBUSB_ERROR_PIPE" value("MESSAGE")); };
destination usbfail_monitor { program("awk '/LIBUSB_ERROR_PIPE/ { system(\"test \$(cut -f 1 -d . /proc/uptime) -gt \$((5*60)) && reboot\") }'"); };
log { source(src); filter(f_usbfail); destination(usbfail_monitor); };
@darconeous
darconeous / code-gen.sh
Last active December 18, 2021 06:19
Alarm System Random Code Generator
for i in 1 2 3 ; do
dealer=`base64 /dev/random | head -c 1000 | sed 's/[^0-9]//g' | head -c 4`
downloader=`base64 /dev/random | head -c 1000 | sed 's/[^0-9]//g' | head -c 5`
installer=`base64 /dev/random | head -c 1000 | sed 's/[^0-9]//g' | head -c 4`
printf "========\n\r\n\r\n\r\n\rDEALER CODE -------- %s DEALER CODE -------- %s\n\rDOWNLOADER CODE ---- %s DOWNLOADER CODE ---- %s\n\rINSTALLER CODE ----- %s INSTALLER CODE ----- %s\n\r
\n\r\n\r\n\r" $dealer $dealer $downloader $downloader $installer $installer
done | nc npie9c125.local. 9100

Mechanism for Secure-by-Default Mesh Network Communication (Draft)

Overall goal is to remove the requirement that hosts keep track of a packet counter across resets. This is a common source of implementation difficulty. When not implemented correctly, it can severely compromise the security of the network.

Symmetric-Crypto Version

In the symmetric version of this scheme, there is a single secret

@darconeous
darconeous / kidde-interconnect.md
Last active April 1, 2024 03:02
kidde-interconnect

Original "dumb" smoke detector interconnect sounds the siren on all interconnected smoke detectors when a 9-to-12 volt (referenced to neutral/white) direct-current signal is continuously present on the signal wire (red). This still how pretty much all interconnected smoke alarms indicate a fire condition.

However, modern interconnected detectors are capable of detecting carbon monoxide and other conditions. When these conditions are signaled, they must be identified as something other than a smoke alarm by the other detectors. Ideally, any dumb smoke detectors

@darconeous
darconeous / masrp.md
Last active September 9, 2019 21:51
Multiplexed Asynchronous Serial Reliability Protocol (MASRP)

Multiplexed Asynchronous Stream Reliability Protocol (MASRP)

Copyright (C) 2017 Nest Labs, All Rights Reserved

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Keybase proof

I hereby claim:

  • I am darconeous on github.
  • I am darconeous (https://keybase.io/darconeous) on keybase.
  • I have a public key whose fingerprint is 23D1 FEC8 37D0 5C91 5BA3 8A5D 95B0 6A0F 3F86 5814

To claim this, I am signing this object:

@darconeous
darconeous / eagle-200-curl.md
Last active August 10, 2022 03:34
Eagle-200 Local Usage via CURL

Eagle-200 Local Usage via CURL

You can locally pull data from your Rainforest Eagle-200 using cURL.

Rainforest has published a local API document which explains the details of the protocol. But this particular document is about quickly getting to the point and giving you some cURL commands you can use to immediately start pulling out data.

Prerequisites

First, I'll assume that you have the following environment variables set: