Skip to content

Instantly share code, notes, and snippets.

@drashna
drashna / keymap.c
Created January 9, 2024 01:46
Custom Key log buffer sync
#pragma once
#define OLED_KEYLOGGER_LENGTH 5
#define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_OLED_KEYLOG_STR
@drashna
drashna / python.log
Created September 29, 2023 06:18
userspace python log
❯ qmk userspace-doctor ░▒▓ 11.00   40%   6.35G   11G 
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
@drashna
drashna / changelog.md
Created July 20, 2023 07:57
changelog-test

Core:

  • Send a dummy keycode to neutralize flashing modifiers in retro tap and key overrides (#20992)
  • Adds a way to separate tab from AUTO_SHIFT_SPECIAL. (#20996)
  • [Enhancement] More info on apply_autocorrect (#21056)
  • Remove quantum/keymap.h (#21086)
  • Unicodemap keycodes rename (#21092)
  • Merge upstream uf2conv.py changes (#21107)
  • Add a dynamic_macro_stop_recording(void) function. (#21108)
  • platfoms: chibios: wait: only define the frequency (#21115)
@drashna
drashna / via.json
Last active January 13, 2023 04:58
{
"menus": [
{
"label": "Layer",
"content": [
{
"label": "Layer",
"content": [
{
"label": "Layer",
@drashna
drashna / config.h
Last active November 5, 2023 03:31
custom oled sync and timeout for asymmetical oled config
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_RIGHT
#undef SPLIT_OLED_ENABLE
#define OLED_TIMEOUT 0
#define SPLIT_ACTIVITY_ENABLE
@drashna
drashna / yt.cmd
Created September 21, 2022 15:48
@Set channel=%1
@set channel_name=%~2
@if not exist "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%" mkdir "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%"
@youtube-dl --rate-limit 5M --download-archive "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%\filelist.txt" -f bestvideo+bestaudio %channel% -ciw -o "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%\[%%(upload_date)s]_%%(title)s" --write-description --write-thumbnail --write-sub --sub-lang en --sub-format srt --embed-subs --embed-thumbnail --add-metadata --convert-subs srt --restrict-filenames --merge-output-format mp4
@youtube-dl --rate-limit 5M --download-archive "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%\filelist.txt" -f bestvideo+bestaudio %channel% -ciw -o "S:\ServerFolders\Videos\Misc\YouTubeChannels\%channel_name%\[%%(upload_date)s]_%%(title)s" --write-description --write-thumbnail --write-sub --sub-lang en --sub-format srt --embed-subs --embed-thumbnail --add-metadata --convert-s
@drashna
drashna / sync.c
Last active September 1, 2022 18:06
caps word sync
#include "transactions.h"
#include <string.h>
bool is_caps_on = false;
void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
// if buffer length matches size of data structure (simple error checking)
if (in_buflen == sizeof(is_caps_on)) {
// copy data from master into local data structure
@drashna
drashna / sync.c
Created August 6, 2022 23:19
transport sync
typedef union {
uint32_t raw;
struct {
bool rgb_matrix_ledmap_active :1;
};
} user_runtime_config_t;
user_runtime_config_t user_state;
void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
float my_sound[][2] = SONG(ONE_UP_SOUND);
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_ENTER:
if (record->event.pressed) {
PLAY_SONG(my_sound);
}
break;
}
  SN32F268 ATmega32U4 AT90USB1286 Proton C - STM32F303xC Blackpill - STM32F411 Nice Nano (nRF52840) RP2040
Speed 48MHz 16MHz 16MHz 72MHz ~96MHz 64MHz 2@ 133MHz
Voltage 3.3V 5V 5V 3.3V with some 5V capable pins 3.3V with 5V capable pins 3.3v 3.3v
Flash size 32kB (~28kB usable) 32kB (28kB usable) 128kB (120kB usable) 256kB 512kB 1MB off-chip flash, up to 16MB
EEPROM si