Skip to content

Instantly share code, notes, and snippets.

@tkrotoff
tkrotoff / #mockWindowLocation.ts
Last active May 14, 2026 08:32
Jest/Vitest mocks for JSDOM window.location & window.history
/* eslint-disable unicorn/no-null */
/*
* Resetting window.location between tests is unfortunately a hard topic with JSDOM.
*
* https://gist.github.com/tkrotoff/52f4a29e919445d6e97f9a9e44ada449
*
* FIXME JSDOM leaves the history in place after every test, so the history will be dirty.
* Also its implementations for window.location and window.history are lacking.
* - https://github.com/jsdom/jsdom/blob/22.1.0/lib/jsdom/living/window/Location-impl.js
@bkw777
bkw777 / Xperia-1-VI-rooted-firmware-update.txt
Last active May 14, 2026 08:31
Sony Xperia 1 VI rooted firmware update
Xperia 1 VI - XQ-EC72 HK
firmware update notes
This is for a HongKong device in the USA.
https://xdaforums.com/t/tool-xperifirm-xperia-firmware-downloader-v5-8-1.2834142/
https://xdaforums.com/t/tool-newflasher-xperia-command-line-flasher.3619426/
https://xdaforums.com/t/tool-unsin-sin-v3-v4-v5-unpacker-v2-0.3128106/
-------------------------------------------
xperia boot modes:
@sundowndev
sundowndev / GoogleDorking.md
Last active May 14, 2026 08:29
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@spilist
spilist / token-efficiency-analysis-prompt.md
Last active May 14, 2026 08:26
코딩 에이전트 토큰 효율과 관련된 상태 점검용 프롬프트

다음 레퍼런스를 바탕으로, 내 코딩 에이전트 설정을 토큰 효율 관점에서 점검해줘.

목표는 성능 저하를 크게 만들지 않으면서 토큰 낭비를 줄이는 거야.

  • 직접 절약(자동 주입 문맥, 긴 툴 출력 제한 등)과 간접 절약(검색/IDE/앱 경로 차단 등)을 구분해서 봐줘
  • 현재 버전 공식 문서나 현재 설치본에서 확인되지 않은 키는 절대 추천하지 마

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.

#!/bin/bash
###############################################
# CONFIGURATION
###############################################
PORTAINER_URL="https://portainer-host:40005"
PORTAINER_COMPOSE_DIR="/mnt/data/containers/portainer/compose"
DOCKHAND_STACK_DIR="/mnt/data/containers/dockhand/stacks/Env"
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 14, 2026 08:22
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
blueprint:
name: Energy Disaggregation
description: Approximate power usage of an appliance
domain: automation
input:
power_helper:
name: Input helper to store the approximate power usage
description: in W
selector:
entity: