Skip to content

Instantly share code, notes, and snippets.

@zaru
zaru / テストケース生成.txt
Created March 23, 2026 00:48
AIテストコードプロンプト例
以下の実現したいことに基づいて、この機能を実現する関数の正しさを検証するための網羅的なテストケースをVitestで生成しテストファイルを作成・更新してください。テストコードや実装コードはまだ書かず、テストケースのみを出力してください。エッジケースや制約条件がしっかりテストされているか確認できるように、各テストメソッドには意図がわかるコメントを添えてください。もし、仕様やデータフローが不明瞭であれば都度ユーザに聞いて下さい。
[出力要件]
実際のテストロジック(arrangeやモックの実装など)は絶対に書かないでください。
代わりに Vitest の describe と it.todo を使用して、テストの階層構造とケース名のみを定義してください。
テストケース名(it.todoの引数)は、それ自体が「生きたドキュメント(仕様書)」となるよう、「〜の時、〜であること」と振る舞いが明確にわかる日本語で記述してください。
モック利用を前提としたテストケースは作らないこと
[実現したいこと]
{
"\u001b\u003c": "CursorStart",
"\u001b\u003e": "CursorEnd",
"\u003cCtrl-x\u003e\u003c0\u003e": "Unsplit",
"\u003cCtrl-x\u003e\u003c2\u003e": "HSplit",
"\u003cCtrl-x\u003e\u003c3\u003e": "VSplit",
"\u003cCtrl-x\u003e\u003cCtrl-c\u003e": "Quit",
"\u003cCtrl-x\u003e\u003cCtrl-f\u003e": "OpenFile",
"\u003cCtrl-x\u003e\u003cCtrl-s\u003e": "Save",
"\u003cCtrl-x\u003e\u003ch\u003e": "SelectAll",
@jlia0
jlia0 / agent loop
Last active April 27, 2026 10:37
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active April 17, 2026 08:31
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@devnoname120
devnoname120 / macos_docker_xorg_forwarding.md
Last active April 22, 2026 03:16
Xorg/X11 forwarding on macOS and docker

Xorg/X11 forwarding on macOS and docker

In order to run Xorg apps on macOS you will need to install xquartz:

brew install --cask --no-quarantine xquartz

And then configure it

<script lang="ts" setup>
import "dockview-core/dist/styles/dockview.css";
import {IContentRenderer, DockviewGroupPanel, GroupPanelContentPartInitParameters, PanelUpdateEvent, Parameters, DockviewComponent} from "dockview-core"
onMounted(() => {
const root = document.getElementById("root")!;
const app = document.getElementById("app")!;
const dockviewComponent = new DockviewComponent( {
[
{
"bindings": {
// Built-in
"ctrl-g": "menu::Cancel",
"ctrl-x 5 2": "workspace::NewWindow",
"ctrl-x ctrl-c": "zed::Quit",
"ctrl-x ctrl-f": "workspace::Open",
"ctrl-x k": "pane::CloseActiveItem",
"ctrl-x o": "workspace::ActivateNextPane",
@mattsan
mattsan / rv32sim.exs
Created September 26, 2022 04:43
RISC-V subset simulator in Elixir
defmodule RV32Sim.Register do
def new do
<<0::32-unit(32)>>
end
def get(_, 0), do: 0
def get(registers, number) do
<<_::size(number)-unit(32), result::32, _::bytes>> = registers
result
@asdf8601
asdf8601 / py2mermaid.py
Last active July 2, 2024 14:59
[mermaid] classDiagram builder from python code
r"""
This requires to have the library (pkg) pre-installed.
Usage:
$ python ./py2mermaid.py --pkg pandas
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g"
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121
@erhangundogan
erhangundogan / typescript-diagnostic.sh
Last active January 11, 2024 20:58
TypeScript compiler CLI commands to debug and diagnose your builds
# npm i -g typescript
# change directory to your project
# Prints out tsconfig.json including extended options if there is any.
tsc --showConfig
# You can use this flag to discover where TypeScript is spending it’s time when compiling
# https://github.com/microsoft/TypeScript/wiki/Performance
tsc --extendedDiagnostics