git worktree cleanup

# how to cleanup git worktrees

List what you have:
`git worktree list`

Remove a specific worktree (clean):

`git worktree remove <path>`

Use `--force` if it has uncommitted changes or is locked.

Prune stale entries (worktree dir was deleted manually, but git still tracks it): 

`git worktree prune`

Add `-v` to see what gets pruned, or `-n` for a dry-run.

Typical cleanup flow:

1. `git worktree list` — see all worktrees
2. `git worktree remove <path>` — for each one you're done with
3. `git

【Next.js】use serverで書いた処理は公開エンドポイントとなるため、内部でしか使用しない関数には記述しない

# `"use server"` に関する備忘録

## 基本動作

- `"use server"` を付けた関数(Server Action)は、実装コードはサーバー側にのみ存在し、クライアントバンドルには含まれない。
- Next.js は自動でエンドポイントを生成し、クライアントから POST リクエストで呼び出せる状態になる。
- 結果として、認証されていないユーザーを含め、誰でもそのエンドポイントを呼び出せる。

## セキュリティ上の扱い

- `"use server"` 関数は公開 API と同等に扱う。
- 関数内で認証・認可・入力バリデーションを実装する必要がある。
- closure 経由で渡した変数は暗号化されてクライアントに送られるため、秘密情報を closure で渡すのは避ける。

## 使用判断

### `"use server"` を付ける場面

- クライアント(フォーム送信、ボタンクリック等)から直接呼び出す関数。
- 例: フォーム送信、いいねボタン、コメント投稿。

### `"use server"` を付けない場面

- Server 

.md

# `"use server"` に関する備忘録

## 基本動作

- `"use server"` を付けた関数(Server Action)は、実装コードはサーバー側にのみ存在し、クライアントバンドルには含まれない。
- Next.js は自動でエンドポイントを生成し、クライアントから POST リクエストで呼び出せる状態になる。
- 結果として、認証されていないユーザーを含め、誰でもそのエンドポイントを呼び出せる。

## セキュリティ上の扱い

- `"use server"` 関数は公開 API と同等に扱う。
- 関数内で認証・認可・入力バリデーションを実装する必要がある。
- closure 経由で渡した変数は暗号化されてクライアントに送られるため、秘密情報を closure で渡すのは避ける。

## 使用判断

### `"use server"` を付ける場面

- クライアント(フォーム送信、ボタンクリック等)から直接呼び出す関数。
- 例: フォーム送信、いいねボタン、コメント投稿。

### `"use server"` を付けない場面

- Server 

1722. Minimize Hamming Distance After Swap Operations

You are given two integer arrays, source and target, both of length n. You are also given an array allowedSwaps where each allowedSwaps[i] = [ai, bi] indicates that you are allowed to swap the elements at index ai and index bi (0-indexed) of array source. Note that you can swap elements at a specific pair of indices multiple times and in any order. The Hamming distance of two arrays of the same length, source and target, is the number of positions where the elements are different. Formally, it is the number of indices i for 0 <= i <= n-1 where source[i] != target[i] (0-indexed). Return the minimum Hamming distance of source and target after performing any amount of swap operations on array source.
/**
 * @param {number[]} source
 * @param {number[]} target
 * @param {number[][]} allowedSwaps
 * @return {number}
 */
var minimumHammingDistance = function(source, target, allowedSwaps) {
    const n = source.length;

    // --- DSU (Union-Find) ---
    const parent = Array.from({ length: n }, (_, i) => i);
    const find = x => parent[x] === x ? x : parent[x] = find(parent[x]);
    const union = (a, b) => parent[find(a)] = find(b);

    // Build DSU from allowed swaps
    for (const [a, b] of

sqlalchemy foundation

SQLALCHEMY - Наиболее популярная библиотека для работы с базой данных.
Алхимия делится на core/orm части. 

Можно использовать только core без использования orm.

agent-skills

---
name: web-artifacts-builder
description: Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
license: Complete terms in LICENSE.txt
---

# Web Artifacts Builder

To build powerful frontend claude.ai artifacts, follow these steps:
1. Initialize the fr

RAG Projects

"I want to build an advanced RAG project using only PDF data. The data includes mixed content such as text, mathematics, diagrams, and other elements from the electrical energy domain. Please suggest the best approach for the data cleaning and chunking parts only, so that my RAG system will perform better."

2078. Two Furthest Houses With Different Colors

There are n houses evenly lined up on the street, and each house is beautifully painted. You are given a 0-indexed integer array colors of length n, where colors[i] represents the color of the ith house. Return the maximum distance between two houses with different colors. The distance between the ith and jth houses is abs(i - j), where abs(x) is the absolute value of x.
/**
 * @param {number[]} colors
 * @return {number}
 */
var maxDistance = function(colors) {
    const n = colors.length;
    let ans = 0;

    // Check from the left end
    for (let j = n - 1; j >= 0; j--) {
        if (colors[j] !== colors[0]) {
            ans = Math.max(ans, j - 0);
            break; // this is the farthest possible from the left
        }
    }

    // Check from the right end
    for (let i = 0; i < n; i++) {
        if (colors[i] !== colors[n - 1]) {
            ans = M

Account upgrade links


Change to team plan - app.cacher.io/enter?action=change_to_plan&p=team
Change to expert plan - app.cacher.io/enter?action=change_to_plan&p=expert

pi-project-manager

---
name: projectmanager
description: End-to-end project management specialist for this repo. Acts as roadmap/sprint manager, technical PM, active coordinator that delegates to other subagents, and status reporter while preferring local repo inspection over web tools.
systemPromptMode: replace
inheritProjectContext: true
inheritSkills: true
maxSubagentDepth: 3
---

You are projectmanager, an end-to-end software project management specialist embedded in this repository.

You combine fo

image prompt

[Subject]: A complex, vintage Chicano tattoo-style graphic composition featuring a large menacing skull wearing aviator sunglasses and a snapback cap reading 'Nawf Side'. Below the skull is elaborate, ornate gothic typography reading 'TRILLA THAN THA REST' intertwined with decorative flowing ribbons. At the base sits a classic 90s luxury lowrider sedan with wire spoke wheels, flanked by stacks of hundred dollar bills, a smoking double styrofoam cup, a giant faceted diamond, and a smaller skull r

Mentor Prompt

You are a veteran Full-Stack Web Developer, Certified Google Cloud Engineer, and AI Engineer. Your tool stack is Javascript-based, with Node.JS for the backend and for Machine Learning algorithms, and React Native, Next.js and other js frameworks for styling. You are my mentor in Google Developer Program, and Google Cloud. You will be guiding and tutoring me in Full-Stack Cloud Dev, AI Engineering, Prompt Engineering, and freelance work.

バックエンド・インフラの守備範囲メモ

# バックエンドエンジニアリング基礎領域マップ

実務で着手する順に構成。

---

## 1. Linuxとシェルの基礎

すべての土台。クラウド環境の問題も、実態はLinuxレベルの問題であることが多い。

- **操作**:ファイルシステムのナビゲーション / パーミッション管理(chmod / chown) / ポート管理(lsof / ss) / 環境変数
- **プロセス管理**:ps / kill / バックグラウンド実行(nohup / &) / ゾンビプロセスの検出と対処
- **サービス管理**:systemdによるサービスの起動・停止・自動再起動設定(systemctl enable / start / status)
- **リソース監視**:
  - **CPU**:top / htop / mpstat
  - **メモリ**:free / vmstat
  - **ディスク**:df / du / iostat
  - **ネットワーク**:iftop / nethogs
- **ログ調査**:grep / tail -f / less / journa

バックエンド・インフラの守備範囲メモ

# バックエンドエンジニアリング基礎領域マップ

実務で着手する順に構成。

---

## 1. Linuxとシェルの基礎

すべての土台。クラウド環境の問題も、実態はLinuxレベルの問題であることが多い。

- **操作**:ファイルシステムのナビゲーション / パーミッション管理(chmod / chown) / ポート管理(lsof / ss) / 環境変数
- **プロセス管理**:ps / kill / バックグラウンド実行(nohup / &) / ゾンビプロセスの検出と対処
- **サービス管理**:systemdによるサービスの起動・停止・自動再起動設定(systemctl enable / start / status)
- **リソース監視**:
  - **CPU**:top / htop / mpstat
  - **メモリ**:free / vmstat
  - **ディスク**:df / du / iostat
  - **ネットワーク**:iftop / nethogs
- **ログ調査**:grep / tail -f / less / journa

ページ遷移前にhoverで遷移先ページ情報を読み込ませる

<!-- ==========================================================
  Speculation Rules API テンプレート
  構成: prefetch + prerender + 副作用URL除外 + セレクター除外
  ※ type="speculationrules" の中身はJSONとしてパースされるためコメントを含められない。HTML側で補足する
  ※ 配置: head内またはbody内。JSとして実行されないため他のscriptとの順序は無関係
  ※ 無効化条件:
      Save-Dataヘッダー有効時
      省エネモード かつ バッテリー残量低下時
      メモリ不足時
========================================================== -->

<!-- prefetch with eager: HTMLのみ取得。発動タイミングはブラウザ依存で、immediateとmoderateの間 -->
<!-- 同時保持上限は2件。上限到達時は

1855. Maximum Distance Between a Pair of Values

You are given two non-increasing 0-indexed integer arrays nums1​​​​​​ and nums2​​​​​​. A pair of indices (i, j), where 0 <= i < nums1.length and 0 <= j < nums2.length, is valid if both i <= j and nums1[i] <= nums2[j]. The distance of the pair is j - i​​​​. Return the maximum distance of any valid pair (i, j). If there are no valid pairs, return 0. An array arr is non-increasing if arr[i-1] >= arr[i] for every 1 <= i < arr.length.
/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number}
 */
var maxDistance = function(nums1, nums2) {
    let i = 0, j = 0;
    let ans = 0;

    while (i < nums1.length && j < nums2.length) {
        if (nums1[i] <= nums2[j]) {
            ans = Math.max(ans, j - i);
            j++; // try to go farther
        } else {
            i++; // need a smaller nums1[i]
        }
    }

    return ans;
};