Skip to content

Instantly share code, notes, and snippets.

@jake-stewart
jake-stewart / color256.md
Last active March 14, 2026 08:13
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@dverb20
dverb20 / philips_hue_dimmer_v22.yaml
Last active December 9, 2025 01:17
Home Assistant Philips Hue Blueprint 2025 RWL022
blueprint:
name: Philips Hue Dimmer Remote RWL022 (ZHA)
description: >-
Control lights and scenes with a Philips Hue dimmer remote RWL022 using ZHA.
Features:
- Power button press detection
- Up/Down dimmer with press and hold detection
- Hue button with cycling scene functionality using a helper number
- Configurable actions for each button interaction
@scpedicini
scpedicini / transcribe.py
Last active September 23, 2025 21:15
Python Dictation Transcription Application
# This script will transcribe an audio file (mp3, wav, etc.) to text and then clean the text using a local LLM model via Ollama. Technically, this script will work with any LLM that supports the standard OpenAI bindings with minor adjustments.
# GETTING STARTED:
# 1. Install required python packages (pip install openai python-dotenv)
# 2. Git clone a copy of ggerganov/whisper (https://github.com/ggerganov/whisper.cpp)
# 3. Build the whisper binary (see the whisper.cpp README for instructions)
# 4. Download one of the whisper models (largev2 is the most accurate for all languages, though the base model works reasonably well for English).
# 5. Install ffmpeg (brew install ffmpeg on macOS, apt-get install ffmpeg)
# 6. Install ollama (https://ollama.com/download)
# 7. Download an LLM model (https://ollama.com/library)
@xen0bit
xen0bit / Dockerfile
Created October 11, 2023 04:19
CVE-2023-38545
FROM debian:latest
RUN apt-get update && apt-get install -y \
git \
build-essential \
wget \
python3
WORKDIR /build
@SMUsamaShah
SMUsamaShah / list_of_p2p_file_sharing.md
Last active March 14, 2026 12:46
List of P2P file sharing tools

Browser Based

  1. Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
  2. Localsend https://web.localsend.org/
  3. FilePizza https://file.pizza/
  4. ShareDrop sharedrop.io https://github.com/szimek/sharedrop (SOLD, not recommended, use one of the forks)
    1. A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop (SOLD, not recommended, use one of the forks)
      1. A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
  5. ToffeeShare https://toffeeshare.com/
  6. Instant.io https://instant.io/
@brodock
brodock / HueDimmer_RWL022.yaml
Last active December 22, 2025 12:48
Philips Hue Dimmer RWL022
blueprint:
name: Philips Hue Dimmer RWL022
description:
"Control lights with a Philips Hue Dimmer Switch (v2).\n\n Blueprint\
\ Version: 4"
domain: automation
source_url: https://gist.github.com/brodock/0c85f4882b885d4d5499cd88d155c38c
homeassistant:
min_version: "2025.9.1"
input:
@felixhammerl
felixhammerl / README.md
Last active October 17, 2025 17:38
MitM TLS encrypted traffic in macOS using SSLKEYLOGFILE

Option 1: Via macOS environment variable:

  1. mkdir -p ~/Library/LaunchAgents
  2. Put tlskeylogger.plist at ~/Library/LaunchAgents/tlskeylogger.plist
  3. launchctl load ~/Library/LaunchAgents/tlskeylogger.plist, so it will load on the next restart
  4. launchctl start ~/Library/LaunchAgents/tlskeylogger.plist, so it will load the environment variable immediately
  5. Restart your browser(s)
  6. See how TLS keys are being written to ~/.tlskeyfile via tail -f ~/.tlskeyfile

NB: This may be hit or miss and many apps do not respect the env var.

@Elijas
Elijas / g915-on-linux.md
Last active December 16, 2025 17:58
How to fix Logitech G915 going back to rainbow after sleep on Linux

How to fix the reset to rainbow lightning effect after keyboard wakes up from sleep

Install G HUB (Windows or MacOS), connect keyboard with Lightspeed, go to Settings, and set ON-BOARD MEMORY MODE to ON. This is a one-time setup for the lifetime of a keyboard.

Other features that work on Linux

Works out of the box:

  • All the media buttons, game mode (disables the Win key), volume control. In other words, all the buttons work.
  • Pressing cycles through brightness levels.
  • Pressing + [NUM] (where [NUM] is 0, 1, 2, ..., 9) allows you to change the lightning effect on the fly.
  • Pressing + - and + + changes the lightning effect speed for the non-custom effects.
@navarrothiago
navarrothiago / README.md
Last active March 15, 2026 00:05
Turn your smartphone or tablet camera into a WebCam to make video conference in Linux