Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@darconeous
darconeous / assert-macros.h
Created March 9, 2012 16:02
Useful Public-Domain C Stuff
/* @file assert-macros.h
** @author Robert Quattlebaum <darco@deepdarc.com>
**
** Originally published 2010-8-31.
**
** This file was written by Robert Quattlebaum <darco@deepdarc.com>.
**
** This work is provided as-is. Unless otherwise provided in writing,
** Robert Quattlebaum makes no representations or warranties of any
** kind concerning this work, express, implied, statutory or otherwise,
@darconeous
darconeous / zanlo.txt
Created October 25, 2012 00:06
Zanlo Lives
U͎̙̮̞͙ͫ͆̑̓n͍̞̼̜̓̈́ͣ̀̒i̜̻̦ͧ͌̊̉ͨ̾͌̾̂c̝̘̗͎̼̠̩̜ͮ̃ͩ̑̐ͅo̳̲͌̌ͦͪ̒ͩ̚d͇̹ͯ̉ͣ̿ͯë̬͇͎̻̖̩́̒̔ͧ̈́ ̹̹͐ͩͥͩͯͥ͑ͅR͍̩̻̝͔̉̌̒̍̆o̯̬͎̟̗̦̚c̞̣̪̼͓̻̜̲̅ͨ̂̿̽k̞̜͓̠̤͉͍̊ͧͭ́s̳̱̳̫̦̭ͤ̂̾ͤͧ!̙̺͖͎̘̩̾͒̌̆ͪ̅ͅ
@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 / 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 / remotizer.txt.md
Last active November 18, 2016 22:14
Remotizer Hacking Notes
@darconeous
darconeous / encrypt.txt.md
Last active September 26, 2017 22:22
Hardware encrypted USB drive concept #Security #Ideas #Hardware

Hardware encrypted USB ideas

There are hardware encrypted USB sticks on the market, but a few things make me uncomfortable about them:

  • They all involve running an executable on the computer you want to access the data from.
  • There is no standardized mechanism for how the app takes your password and communicates that to the microcontroller on the encrypted drive.

Instead of using a vendor-provided executable, I propose a mechamism which allows the encrypted USB drive to be securely mounted on any machine that has a web browser.

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 / main.c
Created March 25, 2018 05:10
ATTiny LED Twinkler
/* ATTiny LED Twinkler
*
* This is come code I wrote a while back to "twinkle"
* four GPIO outputs that would drive LEDs. It was designed
* to be run on an eight-pin ATTiny13 chip. It works
* quite well, even considering how inefficient it is.
*
* - Robert Quattlebaum, 2012
*/