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 / 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 / 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.
@shrwnsan
shrwnsan / gulpfile-express.js
Last active August 29, 2015 13:56 — forked from mollerse/gulpfile-express.js
Gulpfile configs
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@shrwnsan
shrwnsan / sc-dl-min.js
Last active August 29, 2015 13:55 — forked from duncanbeevers/sc-dl-min.js
Bookmarklet which creates download links on *any* Soundcloud page. Full credit goes to @duncanbeevers, with contributions from @markpiro and @haroldSanchezb -- Last tested on Soundcloud site: 4 Feb 2013 Successful :-)
!function(a){var b,c,d,e=$(".sound"),f=require("config").get("client_id");require("lib/connect").getAuthToken();var i,j,k,l,m,h=require("lib/helpers/conversion-helper");for(b=e.length-1;b>=0;b--){c=$(e[b]);var n="https://soundcloud.com"+(c.find(".soundTitle__title").attr("href")||a.location.pathname);k={url:n,client_id:f},m=function(a){return function(b){var c={client_id:f};l=require("lib/url").stringify({query:c},b.stream_url+".mp3"),d=$(a.find(".sound__soundActions .sc-button-group")[0]),j=d.find(".sc-button:first")[0].className.match(/sc-button-((?:small)|(?:medium))/)[1],i=$('<a class="sc-button sc-button-download sc-button-icon sc-button-responsive">Download</a>').attr({title:"Download this sound ("+h.bytesToMB(b.original_content_size)+")",href:l,download:a.find(".soundTitle__title").first().text()+".mp3"}).addClass("sc-button-"+j),0==a.find(".sc-button-download").length&&d.append(i)}}(c),$.getJSON("http://api.soundcloud.com/resolve.json",k).success(m)}}(window);
@shrwnsan
shrwnsan / index.html
Created March 28, 2013 14:49 — forked from anonymous/index.html
A CodePen by Aaron Gustafson. Simple pull quote - This builds on the work of Maykel Loomans: http://miekd.com/articles/pull-quotes-with-html5-and-css/ and makes it a little less repetitious and brings JavaScript in to make it an enhancement. The API is simple: your data attribute simple provides a selector to identify the item to use as the pull…
<p>A pull quote is a typographical technique in which an excerpt or quote from an article is duplicated within the article using a different formatting style so that it jumps out at the reader.</p>
<p data-pullquote="b">Blatantly copying the excerpt of the pull quote into it’s own element is not the way to go. <b>A pull quote is a purely visual technique, and therefore should not change the structure of the body.</b> Next to that, a structural representation of the excerpt would be seen twice by people using feed readers or services like <a href="http://www.instapaper.com/">Instapaper</a>, as well as be re-read for people who use screen readers. So how can we best author this into our mark-up?</p>
<h3>Our good friend, the data attribute</h3>
<p><span class="caps">HTML5 </span>introduced the ability for authors to create custom non-visible data-attributes. These attributes can contain data that will not affect layout or presentation.</p>
<blockquote><p>Custom data attributes are intended to store custom da
<h1 class="parallax">The &lsquo;root element&rsquo; parallax technique</h1>
<img src="http://distilleryimage4.s3.amazonaws.com/631dac84d67611e1a7d81231381b5136_7.jpg" class="parallax skyline">
<img src="http://distilleryimage4.s3.amazonaws.com/16fe826ee3b511e1a47b22000a1cf766_7.jpg" class="parallax blimp">
<img src="http://distilleryimage11.s3.amazonaws.com/07354ffe2f3011e2a23c22000a1f9d66_7.jpg" class="parallax gherkin">
<img src="http://distilleryimage4.s3.amazonaws.com/059c1a748e6311e1b10e123138105d6b_7.jpg" class="parallax dino">
<img src="http://distilleryimage10.s3.amazonaws.com/7ec10646ab5d11e1af7612313813f8e8_7.jpg" class="parallax bull">
<div class="parallax box">
<p>By combining the power of <code>`rem`</code> and a small JavaScript function to manipulate the <code>`font-size`</code> of the <code>`html`</code> element, we can achieve simple but effective parallaxing.</p>
@shrwnsan
shrwnsan / GitHub Gists CSS
Created October 23, 2012 08:51 — forked from tnylea/GitHub Gists CSS
CSS to add un-selectable line numbers to your github gists
.gist .highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist .highlight pre { counter-reset: linenumbers; }
.gist .highlight pre div:before {
color: #aaa;
content: counter(linenumbers);
counter-increment: linenumbers;
left: -4ex;