Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Toggles the MiSTer FPGA menu rotation in MiSTer.ini,
# then reboots to make it take effect.
#
# Save this to /media/fat/Scripts/
INI_FILE="/media/fat/MiSTer.ini"
if [ ! -f "$INI_FILE" ]; then
@dhorlick
dhorlick / tmk_ps2usb_omnikey_sfset.diff
Last active September 5, 2025 15:33
Mods tmk_firmware to configure the special function key mode on Omnikey keyboards
diff --git a/converter/ps2_usb/matrix.c b/converter/ps2_usb/matrix.c
index c441a89b..bb14b9cd 100644
--- a/converter/ps2_usb/matrix.c
+++ b/converter/ps2_usb/matrix.c
@@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "host.h"
#include "led.h"
#include "matrix.h"
+#include "timer.h"
@dhorlick
dhorlick / ploopy_nano_scrollball.diff
Last active July 20, 2022 22:34
qmk/qmk_firmware diff to turn ploopy nano trackball into an awesome scrollball
diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c
index 17cdedac7..8f42075a4 100644
--- a/keyboards/ploopyco/trackball_nano/trackball_nano.c
+++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c
@@ -71,8 +71,23 @@ uint8_t OptLowPin = OPT_ENC1;
bool debug_encoder = false;
__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
- mouse_report->x = x;
- mouse_report->y = y;
@dhorlick
dhorlick / ebsearch
Created January 16, 2016 05:06
Performs a case-insensitive search for a keyword or keywords in ebook files (PDF and ePUB), via Mac OS X's mdfind
#!/bin/bash
# Performs a case-insensitive search for a keyword or keywords in ebook files (PDF and ePUB), via Mac OS X's mdfind
keywords_query=""
for ((i=1; i<=$#; i++)); do
keywords_query="${keywords_query}kMDItemTextContent == \"${!i}\"cd"
if [ $i -lt $# ]; then
keywords_query="$keywords_query && "
fi
done
set -x