Skip to content

Instantly share code, notes, and snippets.

Boost Prompt

A prompt to boost your lazy "do this" prompts. Install with one of the buttons below.

Install in VS Code Install in VS Code Insiders

Use

@iamhenry
iamhenry / Context Harvesting.md
Created August 4, 2025 17:38
Context Harvesting
Use this workflow when you need to thoroughly understand all relevant parts of a codebase 
or topic before making changes or writing documentation.

Source: https://grantslatton.com/claude-code
  1. Enumerate all source code files in the project, explicitly excluding build artifacts and other non-essential directories to ensure a complete and relevant file list.
  2. From the list, heuristically identify filenames most likely related to the target topic or feature; at this stage, simply list them without further action.
  3. For each relevant file, use pattern-matching tools (such as ripgrep) to locate definitions of types, functions, modules, and other major code constructs—tailoring search patterns to the conventions of the specific programming language.
@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active August 19, 2025 15:09
MLX Fine-tuning Google Gemma
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
# Input Parameters
REGISTRY_URL=${1:-"custom-registry.com"} # Default to asia-docker.pkg.dev if not provided
IMAGE_NAME=${2:-"user-service"}
TAG_BASE=${3:-"0.0"}
VERSION_FILE=${4:-"version.txt"}
# Check and create version file if not exists
if [ ! -f "$VERSION_FILE" ]; then
@paulirish
paulirish / log-all-mutations.js
Created January 25, 2023 22:44
Log all DOM mutations to console
// Log all DOM mutations to console.
// Modern interpretation of https://github.com/kdzwinel/DOMListenerExtension
observer = new MutationObserver(onMutation);
observerSettings = {
subtree: true,
childList: true,
attributes: true,
attributeOldValue: true,
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active August 22, 2025 06:23
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@evdokimovm
evdokimovm / index.js
Last active July 19, 2025 04:51
Save the whole list of your saved youtube playlists to text file. Open youtube.com/feed/library or youtube.com/feed/you press "show more" in playlists section. scroll page down to load all playlists list and run the following script in console
var saving_playlist = window.location.href.includes('/playlist?list=')
var all_contents =
saving_playlist ?
document.querySelectorAll('div#contents > ytd-playlist-video-renderer > div#content > div#container > div#meta')
:
document.querySelectorAll("#content > yt-lockup-view-model > div > div > yt-lockup-metadata-view-model > div.yt-lockup-metadata-view-model-wiz__text-container")
var format = '.txt'
@VysotskiVadim
VysotskiVadim / README.md
Last active February 28, 2023 04:07
Build memory trendline
  1. Record perfetto traces using the instruction. Make sure phone has some available memory on disk. Increase max trace size and length. Record only memory-related activities to reduce trace file size. You can stop recording and start a new one. Put all tracess from the session to one directory on your computer.
  2. install Pyton3 brew install python3
  3. pip3 install pandas perfetto
  4. Run ./analyse.py pathToTraceFolder applicationId. Pass directory with traces and application id a parameter, for example if you have traces in directory testTraces and you want to build memory threndline for an application com.mapbox.navigation.examples, run ./analyse.py testTraces com.mapbox.navigation.examples

If analyse.py fails because random port allocation fails, try running it one more time.

Result of the trace is a chart with memory usage (blue) + trend line(red). It additionally output cooficient of the trenline linear function to comm

@HalCanary
HalCanary / html_generator_example.go
Last active November 14, 2023 13:20
html_generator_example.go
// Go Playground: https://go.dev/play/p/ao7M54vTDRQ
package main
import (
"os"
"strings"
"golang.org/x/net/html"
)
action_pool_depth
Current value (from the default) = -1
From //build/toolchain/BUILD.gn:11
Pool for non goma tasks.
added_rust_stdlib_libs
Current value (from the default) = []
From //build/config/rust.gni:44