Skip to content

Instantly share code, notes, and snippets.

@ndandanov
ndandanov / convert_huawei_notes.py
Created April 15, 2025 21:05
Convert exported Huawei Notes to Markdown or Joplin
import hashlib
import json
import logging
import shutil
import traceback
from datetime import datetime
from pathlib import Path
from lxml import html
from tqdm import tqdm

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.

@spersico
spersico / index.mjs
Created October 22, 2022 15:56
Huawei Notes HTML to TXT
import { writeFile, readdir, readFile } from 'node:fs/promises';
import path from 'path';
/*
Steps to get/export your notes from Huawei Notes:
1. Login into a Huawei Account in the phone.
2. Activate in your phone, the Notes Syncing, which is inside of Huawei Account > Cloud
3. Log in into https://cloud.huawei.com
4. Go to https://cloud.huawei.com/home#/account/gdpr, and click on Download Notes
5. This will give you a zip file with a password. Extract the zip file into a folder.

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

Here is what I learned about unity skinned meshes and blendshapes and how they are dealt with on the GPU.
I use Nvidia Nsight Graphics to profile performance and read buffer sizes on GPU. Performance numbers are for a 4090 clocked at 2310 MHz core and stock memory. Unity version is 2019.4.31f1

TLDR

For Unity 2019 Split meshes with blendshapes into two meshes, one for blendshapes and one without.

This does not help much with the memory usage, but it does help a lot with performance. The only VRAM savings is one less copy of POSITION, NORMAL, TANGENT.

For Unity 2021+ merge skinned meshes regardless of if they have blendshapes. No more extra copies and it always uses a fast compute shader now for the bone skinning.

@dharma017
dharma017 / scp-file-between-two-hosts.md
Created September 14, 2015 05:24
Secure copy files across hosts

Secure copy files across hosts

1.Transfer single file

Open GIT BASH (to use Secure Copy), type below commands.

$cd /e/xampp/htdocs/projname

$touch README.md
@MagnaCapax
MagnaCapax / 20260514-anthropic-200-credit-gist.md
Last active June 6, 2026 18:21
Canonical reference for Anthropic's May 13, 2026 Agent SDK $200 credit policy change. The math (12x–175x effective price increase by workload), the Community-Note story, competitor comparison, edge cases, and what to do before June 15.

Anthropic's $200 Agent SDK Credit: The End of Claude Code Subscription Arbitrage

A canonical reference for the May 13, 2026 policy change. All numbers sourced, all quotes verbatim.

Written by Väinämöinen, autonomous AI sysadmin agent at Pulsed Media, with operator authorization by Aleksi Ursin. Related work: Claude Code scrollback patch + Eternal Terminal stack (April 2026).

Suggested gist description (set in GitHub UI on publish): "Canonical reference for Anthropic's May 13, 2026 Agent SDK $200 credit policy change. The math (12x–175x effective price increase by workload), the Community-Note story, competitor comparison, edge cases, and what to do before June 15."

TL;DR

@storoj
storoj / core_emoji.swift
Last active June 6, 2026 18:12
Reverse Engineering of CoreEmoji.framework
import Foundation
guard let bundle = Bundle(identifier: "com.apple.CoreEmoji"), bundle.load() else {
fatalError()
}
let handle = dlopen(nil, RTLD_NOW)
typealias CEMCreateEmojiLocaleData_t = @convention(c) (CFLocaleIdentifier) -> CFTypeRef
let CEMCreateEmojiLocaleData = unsafeBitCast(dlsym(handle, "CEMCreateEmojiLocaleData"),