Skip to content

Instantly share code, notes, and snippets.

View dayne's full-sized avatar

Dayne Broderson dayne

View GitHub Profile
@dayne
dayne / t3-screen-hotfix.sh
Last active November 18, 2019 22:55
t3 screen hotfix
#!/bin/bash
REP_FILE='/usr/share/dispsetup.sh'
AUTOLAUNCH='/etc/xdg/lxsession/LXDE-pi/autostart'
echo "T3 screen hotfix script starting"
sleep 1
if [ -f $REP_FILE.orig ]; then
echo "found $REP_FILE.orig - skipping application of t3 screen hot fix"
@dayne
dayne / keybase.md
Created October 31, 2019 21:20
keybase.md

Keybase proof

I hereby claim:

  • I am dayne on github.
  • I am dayne (https://keybase.io/dayne) on keybase.
  • I have a public key ASCfAqF-4Z-fxbKwHA0wf9GBKcDe22Q-2iXzNtHubFZJRQo

To claim this, I am signing this object:

@dayne
dayne / modzer0-discord-coc.md
Last active August 27, 2019 03:26 — forked from didichanoch/sample-discord-coc.md
ModZer0 discord code of conduct

ModZer0 Discord Server Code of Conduct

Welcome!

The ModZer0 Discord Server is for the Mod0 community and associates to come together to chat, game, and stay connected. You can consider this code of conduct to be the same for the ModZer0 Minecraft and other shared gaming servers.

The current admins are:

  • Ferrio
@dayne
dayne / lorawan-readme.md
Last active September 11, 2019 19:25
lorawan notes

Great introduction to LoRaWAN by Andreas Spiess: LoRaWAN De-Mystified

LoRa is a Low Power Wide Area Network (LPWAN).

  • Network - Multiple devices communicating between each other
  • Wide Area - Longer range than WiFi (and less power) and much longer range than Bluetooth
  • Low Power - Comes at cost of bandwidth

Not a replacement for wifi. Great for low bandwidth sensor networks.

[{"id":"f60f0a99.5906c8","type":"Bme280","z":"fba67b76.39a018","name":"","bus":"1","address":"0x76","topic":"bme280","extra":false,"x":400,"y":60,"wires":[["377e604a.4c94e","b74f0f92.d5eb9","b834c5cf.3c4288"]]},{"id":"b9c6f89.10e1908","type":"debug","z":"fba67b76.39a018","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":80,"wires":[]},{"id":"384a3755.8e8a88","type":"inject","z":"fba67b76.39a018","name":"trigger every 2 seconds","topic":"","payload":"","payloadType":"date","repeat":".1","crontab":"","once":false,"onceDelay":"2","x":170,"y":120,"wires":[["f60f0a99.5906c8"]]},{"id":"377e604a.4c94e","type":"change","z":"fba67b76.39a018","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.temperature_C","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":160,"wires":[["b9c6f89.10e1908","74c6eeea.4f6cd"]]},{"id":"74c6eeea.4f6cd","type":"ui_chart","z":"fba67b76.39a018","name":"","group":"400dc1b.dc7e04","order":0,"w
@dayne
dayne / 0-README-Barrier_Config.md
Last active November 14, 2022 18:01
barrier configuration

I try to avoid using the GUI to configure/run barrier so I created a simple bash script barrier-client.sh to launch my barrier client. It reads from a .config/barrier.cfg file I created to determine the client name and server to connect to.

cat ~/.config/barrier.cfg

BARRIER_CLIENT_NAME=${HOSTNAME}
BARRIER_SERVER=gilbert.lan:24800

This expects the client to already be configured to trust the server. That trust is managed by the ~/.local/share/barrier/SSL/Fingerprints/TrustedServers.txt which should have the fingerprint of the server.

@dayne
dayne / README.md
Last active December 18, 2018 23:06
rhash checker

rhash checker in python

rhash is a great utiltiy for computing hash sums. Even across full directory structures. Handy for creating checksum file manifests to verify complete transfer of files to another location.

Finds any *.sha256 files and assumes they are a checksum manifest for the directory of the same name. Runs a validation of each manifest found and reports if the file doesn't exist or if the checksum does not match.

The point of this is to use the rhash-check.py in Jupyter notebook environments where you can't use rhash directly. If you have rhash has built into it a better alternative to the rhash-check.py script:

rhash -cr --crc-accept=sha256 directory/
@dayne
dayne / README-chef_omnibus_build.md
Last active July 27, 2020 13:46
chef_omnibus_build
@dayne
dayne / 0-WLS_Removing Win Path.md
Last active March 2, 2024 05:45
Cleaning up WLS path to remove /mnt/c paths (world writable).

The Windows Linux Subsystem (WSL) comes with /win/c mounted world read-write and is setup for compatibility between windows and linux by putting all your windows paths into your linux system path. This is great for some usecases. Some tools get grumpy having these world writable directories a users path. While this doesn't break them but it can cause annoying warning messages.

On the other hand, when you don't care about the windows tools being in your path, it might make you more sane not to see those error messages, and also to limit the number of places tools look for supporting binaries not-relevant to themselves.

: warning: Insecure world writable dir /mnt/c in PATH, mode 040777

You can remove all those /mnt/c paths from your $PATH with the following line: