Skip to content

Instantly share code, notes, and snippets.

View brianredbeard's full-sized avatar

redbeard brianredbeard

View GitHub Profile
@brianredbeard
brianredbeard / aider_o3.md
Last active April 27, 2025 11:35
Aider Response coming from o3

architect> /ask why is it that you keep insisting on speaking to me in Spanish or German? What is causing this?

Nothing inside your repository is making me switch languages—the cause is on my side.
I’m instructed to reply in whichever language the user is using. The model decides which language that is by looking at the most recent user messages and guessing their predominant
language. If a previous turn of yours (or of another user in the same thread) was in Spanish or German, my heuristic may still “think” that’s the correct language and continue in it until
it notices enough English again. In short, it’s an over-eager language-detection heuristic, not anything in your codebase.

@brianredbeard
brianredbeard / vanity.c
Created March 31, 2025 22:36 — forked from o0101/vanity.c
gcc -O2 -o vanity vanity.c -lssl -lcrypto
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <openssl/sha.h>
#define TARGET_PREFIX "20250327"
#define MAX_WORDS 256
#define MAX_TEXT 2048
#define MAX_ATTEMPTS (1ULL << 32) // 2^32 attempts (~4.3B, enough for 8-char prefix)
@brianredbeard
brianredbeard / README.md
Last active August 14, 2024 22:33
lspot.py

list spot

a simple utility to quickly identify the cheapest spot location for an instance type

examples

❯ AWS_PROFILE=redbeard python3.11 lspot.py --help
usage: lspot.py [-h] [--json] [--table] [-v] [-1] [-r REGION] instance_type
@brianredbeard
brianredbeard / instructlab.txt
Created May 7, 2024 17:57
Demo of using Instructlab to explain vector in RISC-V
>>> Explain how the vector extension for RISC-V works. Provide definitions of key concepts and components, how it works, and it's benefits. [S][default]
╭─────────────────────────────────────────────────────────────────────────────────────────────── merlinite-7b-lab-Q4_K_M ────────────────────────────────────────────────────────────────────────────────────────────────╮
│ The vector extension for RISC-V is an enhancement to the RISC-V Instruction Set Architecture (ISA) that allows multiple operations to be performed on multiple data elements in parallel, thereby increasing the │
│ throughput of calculations and improving performance in data-intensive applications. This extension introduces new vector registers, vector instructions, and data alignment concepts to optimize the processing of │
│ vector data.
❯ picocom -b 115200 /dev/ttyUSB0
picocom v3.1
port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
@brianredbeard
brianredbeard / shell.out
Created May 8, 2023 00:40
ESP-IDF MicroPython Component errors
### Current Directory Structure (micropython submodule pruned)
❯ tree --gitignore
.
├── CMakeLists.txt
├── components
│   └── micropython
├── main
│   ├── CMakeLists.txt
│   ├── idf_component.yml
│   └── mp-test.c
@brianredbeard
brianredbeard / steps.sh
Created January 6, 2022 06:28
cache disk setup - a shitty history dump of my logs from DIY tiered cache disk setups
[bharrington@host10 media]$ pvcreate /dev/md0
WARNING: Running as a non-root user. Functionality may be unavailable.
/run/lvm/lvmetad.socket: access failed: Permission denied
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
/run/lock/lvm/P_orphans:aux: open failed: Permission denied
Can't get lock for orphan PVs.
[bharrington@host10 media]$ sudo pvcreate /dev/md0
Physical volume "/dev/md0" successfully created.
[bharrington@host10 media]$ sudo pvcreate /dev/nvme0n1p2
Physical volume "/dev/nvme0n1p2" successfully created.
@brianredbeard
brianredbeard / slicer.sh
Created December 18, 2021 22:06
Slicer Wrapper
#!/bin/bash
#
# This script should work with Slic3r (https://github.com/slic3r/Slic3r) as
# well as it's derivatives:
# - https://github.com/supermerill/SuperSlicer
# - https://github.com/prusa3d/PrusaSlicer
# The author uses "SuperSlicer" due to it's advanced feature set, installing
# it at the path ~/.local/bin/slicer.sh
#
# CLI options relevant to configuration (derived via CLI with --help-fff):
@brianredbeard
brianredbeard / cppcheck.out
Last active August 5, 2021 23:48
Output of running platformio check against the marlin code base with various tools
> Executing task: platformio check --environment STM32F103RE_btt <
Checking STM32F103RE_btt > cppcheck (platform: ststm32@~12.1; board: genericSTM32F103RE; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
Marlin/src/HAL/shared/backtrace/unwarm.cpp:56: [low:style] The function 'UnwInitState' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:160: [low:style] The function 'UnwMemReadRegister' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:141: [low:style] The function 'UnwMemWriteRegister' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm.cpp:91: [low:style] The function 'UnwReportRetAddr' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp:45: [low:style] The function 'UnwStartArm' is never used. [unusedFunction]
Marlin/src/HAL/shared/backtrace/unwarm_thumb.cpp:32: [low:style] The function 'UnwStartThumb' is
@brianredbeard
brianredbeard / BTConfig.patch
Last active July 3, 2021 22:43
CNC xPro v5 "patch" set
--- CNCxPRO src/WebUI/BTConfig.h
+++ Grbl_Esp32 src/WebUI/BTConfig.h
@@ -24,7 +24,7 @@
#endif
//defaults values
-const char* const DEFAULT_BT_NAME = "CNC_xPRO_V5";
+const char* const DEFAULT_BT_NAME = "btgrblesp";
#include <BluetoothSerial.h>