Skip to content

Instantly share code, notes, and snippets.

View weskerfoot's full-sized avatar

Wesley Kerfoot weskerfoot

View GitHub Profile
Direct leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x000000530085 in malloc (/home/wes/odinbar/odinbar+0x530085) (BuildId: 65faaea9fba269a7ba7fe66b30d68933796e7525)
#1 0x71f08d88c697 in FcPatternObjectInsertElt /usr/src/debug/fontconfig/build/../fontconfig/src/fcpat.c:506:23
#2 0x71f08d88d20b in FcPatternObjectAddWithBinding /usr/src/debug/fontconfig/build/../fontconfig/src/fcpat.c:680:9
#3 0x71f08d889729 in FcPatternAppend /usr/src/debug/fontconfig/build/../fontconfig/src/fcpat.c:1223:11
#4 0x71f08d889729 in FcParsePattern /usr/src/debug/fontconfig/build/../fontconfig/src/fcxml.c:2786:11
#5 0x71f08d889729 in FcEndElement /usr/src/debug/fontconfig/build/../fontconfig/src/fcxml.c:2909:2
#6 0x71f08cc60e45 in doContent /usr/src/debug/expat/expat/expat/lib/xmlparse.c:3623:11
#7 0x71f08cc61dd4 in contentProcessor /u
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
import board
import lib.adafruit_ht16k33.matrix as M
i2c = board.I2C()
matrix = M.Matrix8x8(i2c)
matrix.fill(0)
matrix.brightness = 0.1
matrix.blink_rate = 0
# glider
matrix[2,2] = 1
static void
motor_timer_cb(TimerHandle_t timer) {
struct rpm_state rotations_left;
xQueuePeek(motor_rpm_q_handle_left, &rotations_left, (TickType_t)1);
struct rpm_state rotations_right;
xQueuePeek(motor_rpm_q_handle_right, &rotations_right, (TickType_t)1);
if (rotations_right.avg > 0 && rotations_right.cur > 0) {
rotations_right.avg = (rotations_right.avg + rotations_right.cur) / 2;
source /opt/homebrew/Cellar/fzf/0.38.0/shell/completion.bash
source /opt/homebrew/Cellar/fzf/0.38.0/shell/key-bindings.bash
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PYENV_ROOT="$HOME/.pyenv"
export EDITOR=vim
LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS
set guifont=Menlo:h23
set encoding=utf-8
set tabpagemax=100
scriptencoding utf-8
set guitablabel=\[%N\]\ %t\ %M
execute pathogen#infect()
"set smartindent
#include QMK_KEYBOARD_H
#include "print.h"
#include <stdint.h>
/* The following defines the configuration for the UART driver. */
/*!
* UART BAUD rate. This is the speed that we transmit at. For the 1MHz
* RC clock, 4800 is the maximum speed (out of the "standard" ones) that
* will work. If you're running at 8MHz or with an external crystal, you
import board
import busio
import digitalio
import adafruit_hid as hid
import adafruit_ble
from adafruit_ble.advertising import Advertisement
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService
from adafruit_ble.services.standard.device_info import DeviceInfoService
from adafruit_hid.keyboard import Keyboard
@weskerfoot
weskerfoot / gist:c624670f3d46def1609553ead28bbf78
Last active December 29, 2024 22:24
Systemd unit file to manage starting barrier through flatpak, with the correct options
[Unit]
Description=Barrier
After=graphical.target
StartLimitIntervalSec=400
StartLimitBurst=3
[Service]
Type=simple
ExecStart=/usr/bin/flatpak run -p --command="barrierc" com.github.debauchee.barrier --no-restart --no-tray --no-daemon --debug INFO --name steamdeck 192.168.0.221
Restart=always
#! /usr/bin/env python
import requests
import cairosvg
import click
from io import BytesIO
from PIL import Image as PILImage
from urllib.parse import quote
from pixcat import Image
def get_png(tex):