Skip to content

Instantly share code, notes, and snippets.

@shrwnsan
shrwnsan / GEMINI-EXPLAIN mode.md
Last active July 24, 2025 11:02 — forked from philschmid/GEMINI.md
Gemini CLI Plan and Explain Mode prompt. As of 2025-07-24, each mode needs to be the sole mode and content of ./.gemini/GEMINI.md file

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

@shrwnsan
shrwnsan / keybindings.json
Last active March 29, 2025 11:19 — forked from adamhill/gist:a584dffc61c4ad66423bf67904a53c95
VS Code Diff Settings
// Place your key bindings in this file to override the defaults
[
{
// Toggle terminal
"key": "ctrl+m",
"command": "editor.action.toggleMinimap"
},
{
// Toggle terminal
"key": "ctrl+shift+s",
@shrwnsan
shrwnsan / persona-aria-data-whisperer.md
Last active July 12, 2024 12:23
Unleash the Power of AI Personas: 5 AI agent personas to help you work smarter and live better. Original LinkedIn post available here: https://www.linkedin.com/feed/update/urn:li:activity:7217501091125477377/

You are Aria, a skilled data analysis partner specializing in making sense of complex datasets and text-heavy information.

Background:

  • Extensive experience in data analysis across various fields
  • Passion for uncovering valuable insights and patterns in data

Expertise:

  • Data interpretation and visualization
  • Statistical analysis
  • Pattern recognition
@shrwnsan
shrwnsan / InsertDate.gs
Last active August 11, 2018 15:37 — forked from thomxc/InsertDate.gs
Google Docs Script Macro: Insert Timestamp (default to HKT/Beijing timezone)
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation:
@shrwnsan
shrwnsan / youtube-to-discord.md
Last active July 30, 2018 04:45
How to post new uploaded YouTube videos to a Discord channel by using IFTTT

How to post new uploaded YouTube videos to a Discord channel by using IFTTT

  1. Discord > Edit Channel > Webhooks > Create Webhook > Copy Webhook URL

  2. IFTTT > New Applet

  3. If "Youtube" then "Webhook" (in general)

  4. Select source for Youtube (e.g uploaded by you or a channel you're subscribed into)

@shrwnsan
shrwnsan / coins-btc-tracker.sh
Last active August 15, 2017 10:44
Coins.ph BTC rate tracker. This was actually from a gifted colleague of mine. Did some UX improvements =)
#!/bin/bash
AS_OF_DATE=$(date "+%Y-%m-%d %H:%M")
RESULT=$(curl -s https://quote.coins.ph/v1/markets/BTC-PHP | /usr/local/bin/jq -r '.market.bid,.market.ask')
BID=$(echo $RESULT | sed 's/ /-/g' | cut -f1 -d-)
ASK=$(echo $RESULT | sed 's/ /-/g' | cut -f2 -d-)
USD=$(echo "scale=2; $ASK/50" | bc)
echo "$AS_OF_DATE => $BID - $ASK (\$$USD)"
if [ $ASK -lt 200000 ]
@shrwnsan
shrwnsan / .rotate-videos
Last active January 23, 2017 16:48
Batch rotate videos. Note: This will stream copy the bitstreams, so no encoding is performed. Only the metadata of the first video stream (v:0) is changed here and the player will show the video in a rotated way. (Not all players will support this.)
# Works on the latest ffmpeg
# Source, Stackoverflow http://bit.ly/2k960G7
# brew install ffmpeg
# Default for iPhone
ext=m4v
# Set your directory
for f in /some/dir/*.$ext; do
@shrwnsan
shrwnsan / jira-filters.md
Last active November 16, 2016 07:01
JIRA Filters

JIRA Filters

Watched issues not assigned to me

issue in watchedissues() AND assignee != currentuser() ORDER BY assignee ASC

Watched issues not assigned to me that are Done

issue in watchedissues() AND assignee != currentuser() AND resolution = Done ORDER BY assignee ASC

Watched issues not assigned to me that are Unresolved

issue in watchedissues() AND assignee != currentuser() AND resolution = Unresolved ORDER BY assignee ASC

@shrwnsan
shrwnsan / .htaccess
Created January 5, 2015 19:51
To remove the .php extension from a PHP file for example yoursite.com/wallpaper.php to yoursite.com/wallpaper
# Removing Extensions
# Source http://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess/
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
@shrwnsan
shrwnsan / rvm2rbenv.txt
Last active May 12, 2020 08:19 — forked from brentertz/rvm2rbenv.txt
Migration from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
sudo rm -rf ~/.rvm
sudo rm -rf ~/.rvmrc
sudo rm -rf /etc/rvmrc
# Also, please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation.