Skip to content

Instantly share code, notes, and snippets.

View bergpb's full-sized avatar
🏠
Working from home

Lindemberg Barbosa bergpb

🏠
Working from home
View GitHub Profile
name code-refactor-review
description Reviews code changes for reuse, composition, codebase consistency, and slop. Use when asked to review PRs/diffs, check code reuse, composition, cleanliness, or whether code fits the codebase.

Code Refactor Review

Review code changes the way Sahaj usually asks for review: go deep on reuse, composition, codebase consistency, and anything that reads like slop.

First Pass

@liquidguru
liquidguru / kindle-pw6-bluetooth-page-turner.md
Last active September 4, 2026 16:58
Bluetooth Page Turner for Kindle Paperwhite 6 (12th Gen)

Bluetooth Page Turner for Kindle Paperwhite 6 (12th Gen)

Firmware 5.18.5 · KOReader · AB Shutter 3

Written by Kaj Maney, April 2026 · Major revisions May and August 2026 A working Bluetooth page turner for the PW6 (MT8110 "Bellatrix") platform.

⚠️ Update — April 2026: An upstream fix is in progress that may significantly simplify this setup in future KOReader releases. @zampierilucas (the kindle-hid-passthrough author) has merged a uevent listener for input device hotplug into koreader-base. Once this lands in a KOReader release, UHID keyboards created by kindle-hid-passthrough may be detected natively, potentially allowing direct key-based page turning without the HTTP API workaround. If you're setting this up after the next KOReader release, test native key input first before following this guide. This guide remains valid for KOReader v2026.03 and earlier.

**⚠️ Update — August 2026: the

@selcukcihan
selcukcihan / AGENTS.md
Created April 15, 2026 09:06
agents.md file for your beloved coding agents

Project Rules

These instructions apply to every task performed in this repository.

Purpose

  • Treat this file as the project-wide source of truth for repository-specific working rules.
  • Read and follow these instructions before making changes in this repo.

Working Style

  • Prefer minimal, targeted changes over broad refactors.
@kieranklaassen
kieranklaassen / token_analysis.py
Created April 6, 2026 20:24
Claude Code token usage analyzer - breaks down usage by project, session, and subagent
#!/usr/bin/env python3
"""
Claude Code token usage analyzer.
Analyzes ~/.claude/projects/ JSONL files for token usage patterns.
"""
import json
import os
import sys
from pathlib import Path
@simoninglis
simoninglis / README.md
Created February 3, 2026 00:19
CI status in tmux status bar (GitHub Actions + Gitea Actions)

CI Status in tmux Status Bar

Put your CI build status in your tmux status bar. Know immediately when something breaks.

C:✓ B:✓ D:✓ V:✓ │ 14:32 01-Feb

Why?

@XDflight
XDflight / README.md
Last active September 3, 2026 10:34
Remove cache and old extensions under "~/.vscode-server/" on your Linux server

If you often connect to your Linux server using VSCode, the "~/.vscode-server/" folder (and sometimes the ~/.cache/ folder too) can get very large because VSCode:

  1. Does NOT clean its download cache after installing extensions;
  2. Does NOT delete old extensions after updating them;
  3. Does NOT remove old VSCode servers after installing a new version.

If your server storage space is limited, you might consider cleaning "~/.vscode-server/" (and ~/.cache/) regularly using the bash script I wrote. Simply run the following command:

curl -sL https://gist.githubusercontent.com/XDflight/5f3509eb84fc282b88059c909036f5bc/raw/fe2a3e7dab19160c17efc7025d138f5350964c0f/clean_vscode-server.sh | bash -s
type: sidebar
path: "0"
cards:
- type: custom:bubble-card
card_type: button
button_type: switch
modules:
- default
show_icon: false
scrolling_effect: false
@gazwald
gazwald / k3s.md
Last active October 28, 2025 23:50
Quick and dirty k3s/metallb/longhorn setup

Overview

Quick and dirty tutorial for setting up a K3S cluster on three nodes with MetalLB and Longhorn.

  • All commands are assumed to be run as root, within /root
  • I barely know what I'm doing so if it works that's great!

With my setup;

  • Three systems with a single NVMe drive.
@hackermondev
hackermondev / research.md
Last active September 4, 2026 17:10
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k