# 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# `"use server"` に関する備忘録
## 基本動作
- `"use server"` を付けた関数(Server Action)は、実装コードはサーバー側にのみ存在し、クライアントバンドルには含まれない。
- Next.js は自動でエンドポイントを生成し、クライアントから POST リクエストで呼び出せる状態になる。
- 結果として、認証されていないユーザーを含め、誰でもそのエンドポイントを呼び出せる。
## セキュリティ上の扱い
- `"use server"` 関数は公開 API と同等に扱う。
- 関数内で認証・認可・入力バリデーションを実装する必要がある。
- closure 経由で渡した変数は暗号化されてクライアントに送られるため、秘密情報を closure で渡すのは避ける。
## 使用判断
### `"use server"` を付ける場面
- クライアント(フォーム送信、ボタンクリック等)から直接呼び出す関数。
- 例: フォーム送信、いいねボタン、コメント投稿。
### `"use server"` を付けない場面
- Server # `"use server"` に関する備忘録
## 基本動作
- `"use server"` を付けた関数(Server Action)は、実装コードはサーバー側にのみ存在し、クライアントバンドルには含まれない。
- Next.js は自動でエンドポイントを生成し、クライアントから POST リクエストで呼び出せる状態になる。
- 結果として、認証されていないユーザーを含め、誰でもそのエンドポイントを呼び出せる。
## セキュリティ上の扱い
- `"use server"` 関数は公開 API と同等に扱う。
- 関数内で認証・認可・入力バリデーションを実装する必要がある。
- closure 経由で渡した変数は暗号化されてクライアントに送られるため、秘密情報を closure で渡すのは避ける。
## 使用判断
### `"use server"` を付ける場面
- クライアント(フォーム送信、ボタンクリック等)から直接呼び出す関数。
- 例: フォーム送信、いいねボタン、コメント投稿。
### `"use server"` を付けない場面
- Server /**
* @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] ofSQLALCHEMY - Наиболее популярная библиотека для работы с базой данных.
Алхимия делится на core/orm части.
Можно использовать только core без использования orm.---
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"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."/**
* @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
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
---
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[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 rYou 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<!-- ==========================================================
Speculation Rules API テンプレート
構成: prefetch + prerender + 副作用URL除外 + セレクター除外
※ type="speculationrules" の中身はJSONとしてパースされるためコメントを含められない。HTML側で補足する
※ 配置: head内またはbody内。JSとして実行されないため他のscriptとの順序は無関係
※ 無効化条件:
Save-Dataヘッダー有効時
省エネモード かつ バッテリー残量低下時
メモリ不足時
========================================================== -->
<!-- prefetch with eager: HTMLのみ取得。発動タイミングはブラウザ依存で、immediateとmoderateの間 -->
<!-- 同時保持上限は2件。上限到達時は/**
* @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;
};