Skip to content

Instantly share code, notes, and snippets.

@lelinhtinh
lelinhtinh / type-vietnamese-on-ubuntu.md
Last active August 31, 2026 03:42
Gõ Tiếng Việt trong Ubuntu

Gõ Tiếng Việt trong Linux

Ghi chú cách dùng IBus Bamboo để gõ Tiếng Việt mà không bị lỗi gạch chân như các bộ gõ khác.

Cài đặt

sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt-get update
sudo apt-get install ibus ibus-bamboo --install-recommends
@karpathy
karpathy / microgpt.py
Last active August 31, 2026 03:29
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@BlueSkyXN
BlueSkyXN / codex-quota-compass.js
Last active August 31, 2026 03:23
codex-quota-compass.js
(async () => {
'use strict';
// ============================================================
// codex-quota-compass.js(发布版)
// ============================================================
// 用法:在 https://chatgpt.com/codex/cloud/settings/analytics#usage
// 或任意 chatgpt.com 页面打开 DevTools Console,粘贴运行。
//
// 安全:
ls - The most frequently used command in Linux to list directories
pwd - Print working directory command in Linux
cd - Linux command to navigate through directories
mkdir - Command used to create directories in Linux
mv - Move or rename files in Linux
cp - Similar usage as mv but for copying files in Linux
rm - Delete files or directories
touch - Create blank/empty files
ln - Create symbolic links (shortcuts) to other files
cat - Display file contents on the terminal
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@lassoan
lassoan / FillHolesInSegments.py
Last active August 31, 2026 03:14
Fills all internal holes inside segments. For example, fills in empty regions inside vertebral bodies segmented with Grow from seeds with intensity-based masking.
segmentationNode = slicer.mrmlScene.GetFirstNodeByClass('vtkMRMLSegmentationNode')
# set value to the size of the larges cracks in the segment surfaces
maximumHoleSizeMm = 2.0
############
masterVolumeNode = segmentationNode.GetNodeReference(segmentationNode.GetReferenceImageGeometryReferenceRole())
# Create segment editor to get access to effects
segmentEditorWidget = slicer.qMRMLSegmentEditorWidget()
# To show segment editor widget (useful for debugging):
@jcefoli
jcefoli / gpg-signing.md
Last active August 31, 2026 03:12
GPG Git Commit Signing Key Cheatsheet

GPG Signing Cheatsheet

This guide walks through best practices of creating a gpg key and signing subkey for the purposes of signing git commits and some brief GitHub instructions.

Creating the Primary Key

First, create the primary key with the following config parameters: Ed25519, certify-only, 5-year expiry This primary key is only used to certify/renew subkeys; this key will be moved off the workstation and secured)

@ovn-is
ovn-is / pwn.py
Created May 5, 2025 17:20
crack new zte factorymode
import random
import re
from urllib.parse import urlparse, parse_qs
from Crypto.Cipher import AES
import requests
# see https://github.com/douniwan5788/zte_modem_tools/issues/20#issuecomment-2849666205
from rss import create_payload_array, verify_do_check_client, parse_mac
ROOT = "http://192.168.1.1"

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.