Skip to content

Instantly share code, notes, and snippets.

@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 RP2040 Nice Nano (nRF52840)
Speed 48MHz 16MHz 16MHz 72MHz ~96MHz 2@ 133MHz 64MHz
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 off-chip flash, up to 16MB 1MB
EEPROM si
@drashna
drashna / config.h
Last active March 24, 2022 16:28
How to emulate wilba_tech rgb
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
@drashna
drashna / keymap.c
Last active January 7, 2022 19:06
dance brackets
#include QMK_KEYBOARD_H
#include "dancing_brackets.h"
void tap_dance_dancing_bracket_on_each_tap(qk_tap_dance_state_t *state, void *user_data) {
if (state->count > 3) {
// There can't be reached any other state here. Stop tap dance.
timer_clear();
}
}
@drashna
drashna / autocorrect_dict_larger.txt
Last active May 6, 2025 04:26
Autocorrect dictionaries for QMK Firmware
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/arm-none-eabi/include/**",
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/lib/gcc/arm-none-eabi/8.3.1/include/**",
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/lib/gcc/arm-none-eabi/8.3.1/include-fixed/**",
"/usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/**",
"/usr/local/Cellar/avr-gcc@8/8.4.0_2/lib/avr-gcc/8/gcc/avr/8.4.0/include/**",