Skip to content

Instantly share code, notes, and snippets.

View vothanhkiet's full-sized avatar
🎯
99% of ideas are worth nothing without good execution.

Kiệt Thành Võ vothanhkiet

🎯
99% of ideas are worth nothing without good execution.
View GitHub Profile
@vothanhkiet
vothanhkiet / GEMINI.md
Created October 21, 2025 11:25 — forked from philschmid/GEMINI.md
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

@vothanhkiet
vothanhkiet / install.sh
Last active October 21, 2025 03:52
Install Tailscale for Batocera with Subnet routing, advert exit node, and accept ssh
#!/bin/bash
# --- Configuration & Argument Check ---
TS_VERSION="$1"
INSTALL_DIR="/userdata/tailscale"
TEMP_DIR="/userdata/temp"
SERVICE_FILE="/userdata/system/services/tailscale"
if [ -z "$TS_VERSION" ]; then
echo "🚨 Error: No Tailscale version provided."
@vothanhkiet
vothanhkiet / GEMINI.md
Created October 14, 2025 06:27 — forked from philschmid/GEMINI.md
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:
@vothanhkiet
vothanhkiet / openwrt_enable_ssh_on_wan.md
Created July 22, 2024 03:14 — forked from Juul/openwrt_enable_ssh_on_wan.md
OpenWRT enable SSH on WAN port

To /etc/config/firewall add:

config rule                                     
        option name             Allow-SSH-WAN   
        option src              wan             
        option proto            tcp             
        option dest_port        22              
 option target ACCEPT 
@vothanhkiet
vothanhkiet / quickAP.sh
Created June 17, 2024 03:51 — forked from MitchRatquest/quickAP.sh
install dhcp server and wifi ap on orangepi board
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
@vothanhkiet
vothanhkiet / AdbCommands
Created January 22, 2024 13:20 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

#!/bin/bash
#Variable Declaration - Change These
HOSTED_ZONE_ID="XXXXXXXX"
NAME="example.com."
TYPE="A"
TTL=60
#get current IP address
IP=$(curl http://checkip.amazonaws.com/)
@vothanhkiet
vothanhkiet / postgres.go
Created August 4, 2022 07:28 — forked from rivo/postgres.go
A demo Go application (a PostgreSQL database browser) highlighting the use of the rivo/tview package. See https://github.com/rivo/tview/wiki/Postgres
package main
import (
"database/sql"
"fmt"
"net/url"
"os"
"reflect"
"regexp"
"strconv"
@vothanhkiet
vothanhkiet / exclude.sql
Created April 8, 2022 10:20 — forked from fphilipe/exclude.sql
PostgreSQL EXCLUDE constraint
CREATE EXTENSION btree_gist;
CREATE TABLE room_reservations (
room_id integer,
reserved_at timestamptz,
reserved_until timestamptz,
canceled boolean DEFAULT false,
EXCLUDE USING gist (
room_id WITH =, tstzrange(reserved_at, reserved_until) WITH &&
) WHERE (not canceled)