Skip to content

Instantly share code, notes, and snippets.

View Oakleafknight06's full-sized avatar
💭
Spending too long in config files

oakleafknight06 Oakleafknight06

💭
Spending too long in config files
View GitHub Profile
@turtlemonvh
turtlemonvh / README.md
Created April 7, 2022 22:49
bookmark_file_parser

Scripts and functions for handling parsing of bookmark files into more friendly formats.

From some work I was doing in parsing bookmarks back in ~2016, for deduplication and finding similar bookmarks in a collection of 30K+ bookmarks I have accumulated over 15+ years.

The goal was to make this approx constant memory so parsing can happen quickly in very resource constrained environments. Hence the custom streaming XML and JSON parsing.

Now that tools like browser-history exist I'll likely revisit this project in the next couple years since I'll be able to make a lot of progress in just a few hours. At that time I'll likely convert all this into a more public repository.

Import

@yookoala
yookoala / 90-mac-superdrive.rules
Last active July 2, 2025 06:11
udev rules to use Apple SuperDrive on Linux
#
# Apple SuperDrive initialization rule
#
# See: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw --cmdset=1 %r/sr%n EA 00 00 00 00 00 01"
@andrebrait
andrebrait / keychron_linux.md
Last active July 25, 2025 06:44
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 25, 2025 20:02
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).