1 = special key is used first; press 'fn' to get function key (e.g., F1, F2, etc)
2 = fn key is used first; press 'fn + F2' will increase screen brightness.
Example:
echo 2 > /sys/module/hid_apple/parameters/fnmode
#!/bin/bash | |
# Check network connectivity and shutdown the device (rPi) if the network can't | |
# be reached. This script should run on a cron job and should check net | |
# connectivity every few hours (or as often as you require). This will reduce | |
# the need to unplug the rPi while it's running in order to hook up an HDMI | |
# cable or USB-TTL cable and invesitgate the situation. | |
# | |
# Log file is /var/log/syslog |
/** | |
* HSV/HSB to RGB color space converter | |
* | |
* Used to convert HSB values from OpenHAB's ColorPicker | |
* to RGB for use with WS2812B LEDs and Adafruit's NeoPixel | |
* library. | |
* | |
* ...from http://stackoverflow.com/a/36209005 | |
*/ |
#!/bin/bash | |
# Find all files in the current directory (without recursing), that are bigger than 150 MB. Then create a directory | |
# named after each file and move that file into it's directory. | |
# | |
# This was used to organize a folder full of single movie files so that Radarr would recognize them. | |
# | |
find . -maxdepth 1 -type f -size +150M -exec sh -c 'NEWDIR=`basename "${1%.*}"` ; mkdir "$NEWDIR" ; mv "$1" "$NEWDIR"' _ {} \; |
ESP8266 ADC REFERENCE VOLTAGE
NodeMCU Amica R2 ADC aRef appears to be 3406, which is about 1064 mV when you account for the 220k/100k voltage divider before the ADC pin (ratio of .3125).
vOUT = vIN * (R2 / R1 + R2)
vOUT = 3406 * (100 / 220 + 100)
vOUT = 3406 * 0.3125
vOUT = 1064
#!/bin/bash | |
mosquitto_sub -v -h hostname.local -t topic/subtopic | xargs -d$'\n' -L1 sh -c 'date "+%D %T $0"' | tee -a ~/mqttmon.log |
/** | |
* birdhouse | |
* | |
* ...an ESP8266 (NodeMCU Amica / Alloet ESP-12E Breakout) powered | |
* temperature sensor (that draws as little power as possible) | |
* | |
* @author Austin <austin@github.com> | |
* @date 2017.03.19 | |
*/ |
####### # # ###### # # | |
# # ##### ###### # # # # # # ## # | |
# # # # # ## # # # # # # # # | |
# # # # ##### # # # # # ###### # # # | |
# # ##### # # # # # # # # # # | |
# # # # # ## # # # # ## | |
####### # ###### # # # # # # | |
# Which local IP address should OpenVPN |
MODULES=(ext4) | |
BINARIES=() | |
FILES=() | |
HOOKS=(base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck) | |
# Initial attempt, but had issues with unlocking the cryptlvm volume with this... | |
# But who the fuck wants a systemd-based initramfs anyway!? /s | |
# | |
# We can still use systemd-boot to use Apple's native bootloader and read the .efi |