Skip to content

Instantly share code, notes, and snippets.

@pedrovhb
pedrovhb / set_ergo_scroll.py
Last active April 4, 2023 15:58
This makes it so that as long as that button is being held, moving the cursors scrolls instead.
#! /usr/bin/env python
import re
import subprocess
import textwrap
RE_LOGITECH_ID = rb"Logitech MX Ergo[\s\-\w]+id=(\d+).*pointer"
def set_ergo_scroll() -> None:
@TimovNiedek
TimovNiedek / main.rs
Last active March 11, 2023 14:12
This is an implementation of using MIDI messages to control values in the nannou model. The MIDI connection is running on a separate thread per device. Custom devices can be added by extending midi.rs. Tested with nannou = "0.15", midir = "0.7.0".
use nannou::prelude::*;
mod midi;
use std::sync::mpsc;
fn main() {
nannou::app(model).update(update).run();
}
struct Model {
_window: window::Id,
@Eli-the-Bearded
Eli-the-Bearded / slowcat.c
Created August 21, 2020 04:11
cat, but slow, for old ASCII animations
/*
* Inspired by, but a nearly complete rewrite of:
* slowcat.c - slow down the display of a file
* copyright (c) 2001,2002,2007 dave w capella All Rights Reserved
* found here:
* https://grox.net/software/mine/slowcat/
* in August 2020.
*
* Original license (unchanged):
* * distributed under the terms of the GNU Public license
@denalena
denalena / gnome-extensions.md
Last active September 27, 2023 13:05
[GNOME Extensions] A collection of GNOME Extensions that I use and can't live without. Tested on GNOME 3.32.1 #gnome

GNOME Extensions

GNOME 42

audio-output-switcher@anduchs
clipboard-history@alexsaveau.dev
gnome-ext-mitz@ozealis.de
gtktitlebar@velitasali.github.io
middleclickclose@paolo.tranquilli.gmail.com
noannoyance@daase.net
scroll-workspaces@gfxmonk.net
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 29, 2024 14:14
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7};
byte voiceEnabled[6];
byte voiceType[6];
byte states[6];
byte noiseCount[6];
unsigned long start[6];
unsigned int periods[6];
unsigned long nextFlip[6];
byte noise = 0;
@soarez
soarez / ca.md
Last active July 29, 2024 04:39
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.