Skip to content

Instantly share code, notes, and snippets.

View khasky's full-sized avatar
💭
Находи в себе силы делать то, на что другие просто не способны.

Khasky khasky

💭
Находи в себе силы делать то, на что другие просто не способны.
View GitHub Profile
@khasky
khasky / cloudflare-email-routing.md
Created September 14, 2026 06:36
Cloudflare Email Routing: forward hello@example.com to an external inbox

Cloudflare Email Routing: forward hello@example.com to an external inbox

Prerequisites: the domain is on Cloudflare DNS (nameservers delegated, DNS Setup = Full), and it has no other MX records (Email Routing owns the MX set).

1. Verify the destination address

Dashboard > Email Service > Email Routing > Destination Addresses > Add address. Enter the external inbox (e.g. you@gmail.com). Cloudflare emails a confirmation link; click it. The row must read Verified.

@khasky
khasky / qip_export.py
Created September 9, 2026 10:27
ICQ / QIP Chat History Export
"""Converts QIP chat history (.qhf binary and .txt plain) into a browsable HTML export.
Formats:
.qhf QIP 2010 / Infium binary history. Layout per the QHF spec (CHERTS/im-history);
message bodies are obfuscated with the stream cipher plain[i] = 0xFE - i - cipher[i].
Record timestamps are unix seconds holding local wall-clock time, so they are
rendered with gmtime and never shifted.
.txt QIP Compaq plain export, cp1251, records separated by a dash rule ending in
"<-" (incoming) or ">-" (outgoing).
"""
@khasky
khasky / settings.json
Last active August 30, 2026 10:00
Permissive .claude/settings.json
{
"attribution": {
"commit": "",
"pr": ""
},
"permissions": {
"allow": [
"Bash",
"Bash(gh api:*)",
"Bash(git push:*)",
@khasky
khasky / github-contributors-cache-fix.md
Created August 22, 2026 07:49
Removing a stale contributor from a GitHub repository (the contributors cache survives a history rewrite)

Removing a stale contributor from a GitHub repository

You rewrote history to drop commits authored by the wrong account, force-pushed, and the sidebar on the repository page still lists that account under Contributors. Waiting does not help — reports of it persisting for days are common.

Why it happens

The contributors list is a cached index, not a live read of the commit graph. A force-push replaces the refs but never invalidates that index. The REST endpoints and the rendered

@khasky
khasky / clear-git-commit-history.txt
Created July 30, 2026 05:13
Clear git commit history
0. Бэкап (обязательно перед переписыванием истории):
git clone --mirror https://github.com/khasky/repo.git ../repo-backup.git
1. Схлопнуть всё в один коммит (orphan-метод):
git checkout --orphan fresh
git add -A
git commit -m "Initial commit"
git branch -D main
git branch -m fresh main
@khasky
khasky / windows-dev-cache-cleanup.bat
Last active July 10, 2026 23:32
Safely clean common Windows development caches: pip, npm, Yarn, pnpm, Playwright, and inspect installed NVM versions.
:: 1) pip
py -m pip cache info
py -m pip cache purge
:: 2) npm
npm cache verify
npm cache clean --force
:: 3) yarn
yarn cache clean
@khasky
khasky / settings.local.json
Created May 16, 2026 07:13
Claude Code settings preset: acceptEdits mode with full Bash allowed, plus ask/deny guardrails for dangerous, network, Git, publish, and secrets-related actions
{
"permissions": {
"defaultMode": "acceptEdits",
"allow": [
"Read",
"Edit",
"Write",
"Bash"
],
"ask": [
@khasky
khasky / settings.local.json
Created May 16, 2026 07:12
Claude Code settings preset: acceptEdits mode, explicit dev-command allowlist, MCP whitelist, and guardrails for secrets and destructive Bash commands
{
"permissions": {
"defaultMode": "acceptEdits",
"allow": [
"Read",
"Edit",
"Write",
"Bash(git status)",
"Bash(git status *)",
@khasky
khasky / .cursorindexingignore
Created May 8, 2026 05:21
.cursorindexingignore
node_modules/
dist/
build/
coverage/
.next/
.nuxt/
.turbo/
.cache/
@khasky
khasky / .cursorignore
Created May 8, 2026 05:20
.cursorignore
# Secrets
.env
.env.*
*.pem
*.key
*.p12
*.pfx
secrets/
private/
certs/