Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@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
@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 / 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 / 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 / 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 / lifx-coap-bridge.md
Last active June 30, 2016 01:09
LiFX CoAP Bridge

LiFX CoAP Bridge

This document is outlining the schema for a CoAP bridge for LiFX devices.

  • /discover - Post to force rediscovery of LiFX equipment.
  • /d/
    • all/
      • raw - Send a raw frame to all devices.
  • power
@darconeous
darconeous / engenius-eap600-enable-ssh.md
Last active March 24, 2023 20:02
Enabling SSH on Engenius EAP600

Enabling SSH on Engenius EAP600 (and maybe other models)

This tutorial will walk you through the steps needed to get root SSH access on an Engenius EAP600 dual-band WiFi access point. SSH doesn't come enabled out of the box on these things, so if you want to SSH into the device (which is running an old version of OpenWRT), keep reading.

@darconeous
darconeous / os-x-syslog-server.md
Last active May 2, 2024 13:55
Using OS X as a Syslog Server

Using OS X as a Syslog Server

This document describes how to set up an OS X to be a syslog server that logs messages from the local network. It was largely meant for my own purposes so that I don't forget what I did, but feel free to use it for your own purposes.

A problem with just "turning this on" is that you will not see the correct hostname in the syslog entries. What we will do is use

@darconeous
darconeous / dh.pem
Last active June 23, 2023 11:09
Getting FreeRadius set up on EdgeRouter
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEAq5/y4YW0hozeF0bQw86uDaDO0o+68DjAch61bc3nwyVC77e6JYUT
5F9x+mn9j25KhbcNGBcZvO/TFHsPf4bx4fojNKD2T5nZATJRtGuepnyjz5XEpPe2
ojAsjYpPg/0HZou/tyPM1OGTi5qlVUHa+GHrpX5419NDdOCU5IRr1kkIOMaT7+co
OFAlGCr8fiLTArGWbZDed3N0EvXE1JaIlOmQmVxLP8EycZsbjnCWB9b7DfQW2TeB
9Qp3PjfpAH/VPc3xrMqrXLlGR3h6PA5FfanN2e1XWISOYQe9N/K5uN6lze+HoAk6
Kusp+bLFxWX5EDxK1XXW+4L5JwNwUDMZCwIBAg==
-----END DH PARAMETERS-----
@darconeous
darconeous / ham-arngll.txt.md
Last active November 2, 2021 18:38
Amateur Radio Next Generation Link Layer (ARNGLL)