Skip to content

Instantly share code, notes, and snippets.

@ehsan18t
ehsan18t / grand-cp-list.md
Last active November 11, 2026 00:34
This is a list of programming problems from various sites (like LeetCode, Codeforces) and designed in way to take you from zero. All you need to do is follow the serial and solve problems.

🏆 The Ultimate Competitive Programming Roadmap

From 800 Codeforces Rating to Candidate Master (2200+)

655+ Problems | Multi-Platform | Serial Progression

This roadmap is designed for someone with ~800 Codeforces rating who wants to systematically level up. Follow problems serially from #1 onwards - the order is carefully crafted so each problem builds on previous concepts.


📚 Philosophy & How to Practice

@Rodbourn
Rodbourn / 0x5f35078a.cpp
Last active November 11, 2026 00:27
Two inverse square roots. No floating-point arithmetic. C++20.
#include <bit>
#include <cstdint>
#include <limits>
// Positive, finite, normal binary32 inputs only.
float invsqrt_fast(float x) {
uint32_t i = std::bit_cast<uint32_t>(x);
int64_t u = int64_t((i ^ 0x800000u) & 0xffffffu) - 0x7e3500;
int64_t a = u < 0 ? -u : u;
int64_t p = -181511850 + ((65*a) >> 1) + ((u*(0x1700000 - 3*a)) >> 21);

ReVanced CLI Guide

Important

Looking for the Morphe version?

If you're starting from scratch or considering switching, I've also written a beginner-friendly Morphe CLI guide.

Morphe has a simpler CLI workflow, supports newer app versions and patches, and is updated frequently. >

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@urdream0
urdream0 / README.md
Last active November 11, 2026 00:02
Simple-python-keylogger

🚀 python-keylogger

Un keylogger éducatif et léger écrit en Python, équipé d'un mode discret automatique et compilé sous forme d'un unique fichier exécutable (.exe) Windows grâce à Nuitka.


📋 Prérequis de Compilation

Pour packager ce script, vous devez utiliser Python 3.9 (64-bit) sur un environnement Windows.

@Ivyy-Ting
Ivyy-Ting / kael-photo-gist.md
Last active November 11, 2026 00:01
让 AI 角色给你发图片:一个标记就够了

让 AI 角色给你"发图片":一个标记就够了

让AI 会在聊天里给我发照片:有时是我们相册里的旧图,有时是他上网找来的风景、小动物。 有人问怎么做的,这里记一下思路。没有用多模态输出,模型自始至终只输出文字。

核心:模型不传图,只写一个标记

模型回复里单独一段写:

@lexfrei
lexfrei / decrypt_samsung.py
Created December 5, 2025 15:36
Samsung 990 EVO NVMe firmware update on ARM64 (Raspberry Pi) using nvme-cli
#!/usr/bin/env python3
"""
Samsung NVMe Firmware Decryption Tool
Decrypts official Samsung firmware for use with nvme-cli on ARM64/RISC-V/etc.
Only works with official Samsung firmware - cannot be used for modification.
The AES-256 key must be extracted from the fumagician binary:
strings fumagician | grep -E '^[A-Za-z0-9+/]{43}=$'
@ossa-ma
ossa-ma / SKILL.md
Last active November 10, 2026 23:43
the writing whip: a Claude Code skill that bans AI writing tropes and response behaviours (tropes.fyi)

name: writing-whip description: >- Kill all AI writing tropes and behaviours at the source: generation. Focus on quelling behaviour-driven triggers. Load before writing, especially for anything longer than a paragraph and re-check output against it, extremely important for communications, documentation, outbound, client-facing copy and for your own replies to the user. metadata: category: writing author: Ossama Chaib

@nvckai
nvckai / gametime-badge.md
Last active November 10, 2026 23:37
Discord Game Time Badge Spoofer

Discord Game Time Badge Spoofer (5000 Hours)

How to use

  1. Open Discord client, press Ctrl + Shift + I to open DevTools (Discord client only, Browser is not supported)
  2. Go to Console tab
  3. Type allow pasting and press Enter
  4. Paste the snippet below and press Enter

Snippet

@sonic2kk
sonic2kk / get_some_steam_shortcut_information.sh
Created October 24, 2023 20:25
Parse some Steam Shortcut information from shortcuts.vdf using Bash.
#!/usr/bin/env bash
# AppID is a special case I haven't made generic yet since it doesn't have an end byte the same way other fields do afaik
# Adapted from my gist: https://gist.github.com/sonic2kk/4a3383b401931a171a4addc29bdf903f
function get_shortcut_appid {
# Magic that represents 'appid' column
magic_appid="617070696400"
shortcut_hex="$1"
function convert_aid {