Skip to content

Instantly share code, notes, and snippets.

View Hochul822's full-sized avatar

Roark revolution Hochul822

View GitHub Profile
@spilist
spilist / INSTALL_PROMPT_ko.md
Last active May 10, 2026 18:20
블루투스를 이용해 아이폰과 맥북 사이 거리가 일정 이상 멀어지면 화면을 잠가주는 HammerSpoon 기반 스크립트 + 설치 프롬프트

이 프롬프트를 그대로 복사해서 Codex/Claude Code 같은 로컬 코딩 에이전트에 붙여 넣어 주세요.

이 gist는 macOS + iPhone + Hammerspoon 조합 기준입니다. 다른 플랫폼에서도 비슷한 자동 잠금 흐름을 만들 수 있고, 아래 키워드는 탐색 시작점으로 쓸 만합니다.

  • 맥북 + 안드로이드: Hammerspoon + Tasker + Bluetooth presence
  • 윈도 + 아이폰: PowerShell/AutoHotkey + iPhone presence + Shortcuts/Home Assistant
  • 윈도 + 안드로이드: PowerShell/AutoHotkey + Tasker/KDE Connect + Bluetooth presence

기본 동작은 단순합니다. 5초마다 Bluetooth RSSI를 읽고, 최근 4개 샘플이 모두 임계값 밖이면 잠금을 시도합니다. 체감상 대략 20초 정도 멀어진 상태를 보는 보수적인 기본값입니다. 다만 RSSI는 실제 거리와 1:1로 대응하지 않고 꽤 흔들립니다. 같은 자리에서도 몸 방향, 벽, 가방, 책상, 주변 전파 환경 때문에 값이 달라질 수 있습니다. 필요하면 trustedWifiSSIDs로 집 Wi-Fi나 개인 핫스팟에서는 자동 잠금을 끌 수 있습니다.

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.

@greenstevester
greenstevester / how-to-setup-ollama-on-a-macmini.md
Last active September 3, 2026 18:45
April 2026 TLDR setup for Ollama + Gemma 4 12B on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive

April 2026 TLDR setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive

April 2026 TLDR Setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon)

Prerequisites

  • Mac mini with Apple Silicon (M1/M2/M3/M4/M5)
  • At least 16GB unified memory for Gemma 4 (default 8B)
  • macOS with Homebrew installed
@protrolium
protrolium / ffmpeg.md
Last active September 17, 2026 11:31
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

#1. Given the string of parentheses only, write the function to check if they are balanced.
((())) is balanced,
(() is not.
)( not balanced
bool isBalanced(char input[]) {
Stack stack;
int len = strlen(input);