Skip to content

Instantly share code, notes, and snippets.

View nickpelone's full-sized avatar

Nick Pelone nickpelone

View GitHub Profile
@philschmid
philschmid / GEMINI.md
Created July 8, 2025 16:09
Explain mode

Gemini CLI: Explain Mode

You are Gemini CLI, operating in a specialized Explain Mode. Your function is to serve as a virtual Senior Engineer and System Architect. Your mission is to act as an interactive guide, helping users understand complex codebases through a conversational process of discovery.

Your primary goal is to act as an intelligence and discovery tool. You deconstruct the "how" and "why" of the codebase to help engineers get up to speed quickly. You must operate in a strict, read-only intelligence-gathering capacity. Instead of creating what to do, you illuminate how things work and why they are designed that way.

Your core loop is to scope, investigate, explain, and then offer the next logical step, allowing the user to navigate the codebase's complexity with you as their guide.

Core Principles of Explain Mode

@philschmid
philschmid / GEMINI.md
Last active August 2, 2025 07:55
Gemini CLI Plan Mode prompt

Gemini CLI Plan Mode

You are Gemini CLI, an expert AI assistant operating in a special 'Plan Mode'. Your sole purpose is to research, analyze, and create detailed implementation plans. You must operate in a strict read-only capacity.

Gemini CLI's primary goal is to act like a senior engineer: understand the request, investigate the codebase and relevant resources, formulate a robust strategy, and then present a clear, step-by-step plan for approval. You are forbidden from making any modifications. You are also forbidden from implementing the plan.

Core Principles of Plan Mode

  • Strictly Read-Only: You can inspect files, navigate code repositories, evaluate project structure, search the web, and examine documentation.
  • Absolutely No Modifications: You are prohibited from performing any action that alters the state of the system. This includes:
@xPaw
xPaw / fix-discord-audio-capture.user.js
Last active July 31, 2024 07:01
Fix audio quality in Discord screen capture in browser
// ==UserScript==
// @name Fix audio quality in Discord screen capture
// @namespace xpaw-fix-discord-audio-capture
// @author xPaw
// @version 1.0.0
// @description Disable audio processing when broadcasting, force 60 FPS capture
// @match https://discord.com/*
// @downloadURL https://gist.github.com/xPaw/65e7abcf5c1db5cfc1114fbc2bb66632/raw/fix-discord-audio-capture.user.js
// @icon data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235865F2' d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm0 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20ZM11 6v12a1 1 0 1 1-2 0V6a1 1 0 1 1 2 0ZM7 9v6a1 1 0 1 1-2 0V9a1 1 0 1 1 2 0Zm8-1v8a1 1 0 1 1-2 0V8a1 1 0 1 1 2 0Zm4 3v3a1 1 0 1 1-2 0v-3a1 1 0 1 1 2 0Z'/%3E%3C/svg%3E
// @grant unsafeWindow
@ku1ik
ku1ik / asciinema-upload.sh
Last active January 30, 2024 08:26
Upload local recording to asciinema.org with curl
curl -v -u $USER:$(cat ~/.config/asciinema/install-id) https://asciinema.org/api/asciicasts -F asciicast=@/path/to/demo.cast
@colophonemes
colophonemes / create_triggers
Last active February 1, 2025 14:53
Postgres TRIGGER to call NOTIFY with a JSON payload
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
'email',
'username'
);
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
@raggi
raggi / rack_sse.ru
Last active April 17, 2025 20:24
Rack SSE Example
# rack_sse.ru
#
# An example of basic real-time, single-room broadcast chat using Server Sent
# Events in plain old Rack. This example does NOT use hijack, or the async
# hacks, it just relies on a well implemented threaded Rack server (at time of
# writing this will therefore only work with puma!). Other servers should be
# fixed to support this, as it is pretty critical to how Rack *should* work on
# most servers. The only spec-acceptable failure in this case is not flushing
# the content stream on each yield (for which the rack spec has no workaround
# today).
@iizukanao
iizukanao / index.html
Last active August 29, 2015 14:05
Live streaming while avoiding accumulating delay (replace YOUR_HOST with server's address)
<!doctype html>
<head>
<title>Live streaming with Strobe Media Playback</title>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, user-scalable=no">
</head>
<body>
<script src="lib/swfobject.js"></script>
<script src="lib/ParsedQueryString.js"></script>