Skip to content

Instantly share code, notes, and snippets.

View alexandear's full-sized avatar

Oleksandr Redko alexandear

View GitHub Profile
@aras-p
aras-p / preprocessor_fun.h
Last active August 3, 2026 21:06
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@maratori
maratori / .golangci.yml
Last active August 1, 2026 16:08
Golden config for golangci-lint
# ==================================================================================================
#
# NOTICE
#
# This gist is no longer maintained. It was moved to repo:
#
# https://github.com/maratori/golangci-lint-config
#
# Full history and all v2 releases are preserved in the repo.
#
#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@jofftiquez
jofftiquez / strava-kudos-script.js
Last active May 16, 2026 23:01
Automatic kudos script for Strava web
// Strava Kudos Clicker Automation Script
// Purpose: Automatically clicks "Give Kudos" buttons on your Strava feed
// Features:
// - Handles dynamic loading of buttons.
// - Smoothly scrolls to each button before clicking.
// - Timeouts between clicks and retries to avoid overloading the page.
// - Maximum retry limit to prevent infinite loops.
// How to Use in Browser's Developer Console:
// 0. Head over to https://www.strava.com/dashboard (Make sure you're logged in)

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.