Skip to content

Instantly share code, notes, and snippets.

@Jay87682
Jay87682 / GEMINI.md
Created August 21, 2025 02:44 — 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:
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import sys
class Window(QWidget):
def __init__(self, *args):
QWidget.__init__(self, *args)
self.setLayout(QVBoxLayout())
self.layout().addWidget(QLabel("<font color='red'>This is the text</font"))
# let the whole window be a glass
@Jay87682
Jay87682 / pygtk-cairo-opaque-xshape-window-from-png.py
Created December 10, 2019 15:34 — forked from skriticos/pygtk-cairo-opaque-xshape-window-from-png.py
Transparent, irregular edge splash screen with pyGTK and XShape.
""" Transparent, irregular edge splash screen with pyGTK and XShape.
Takes a png image with transparent section, creates a window with pyGTK, puts this image in
there with cairo and then trims the edges with X11 XShape clipping extension.
This file demonstrates a python script which loads a png image of size 800x650 and name base.png
Then it creates a GTK+/Cairo window with opaque settings from the png file and the transparent
portions cut out with a mask. Basic, but works and looks great.
Note: this is a proof of concept file. It works, but it is by no means production ready.
"""
version: '3.2'
services:
mysql-server:
image: mysql/mysql-server:5.7
container_name: mysql-server-5.7
environment:
NODE_ENV: production
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
@Jay87682
Jay87682 / gist:5857cee8fac2eae5230b2945f9934a17
Created September 1, 2019 15:57
docker file for my media server
From ubuntu:16.04
RUN apt-get update -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:jonathonf/ffmpeg-4
RUN apt-get update -y
RUN apt-get install -y net-tools \
&& apt-get install -y ffmpeg \
&& apt-get install -y iputils-ping \
&& apt-get install -y ssh \

video subtitle

ffmpeg -i *.mp4 -vf subtitles=*.srt output.mp4

element stream to ts

  • ffmpeg -i audio.aac -i ch2.h264 -acodec copy -vcodec copy -f mpegts out.ts

rtsp 2 rtmp

  • ffmpeg -rtsp_transport tcp -i rtsp://fuck.com/fuck/fuck -c copy -f flv rtmp://shit.com/shit/shit

截图片

@Jay87682
Jay87682 / README.md
Created February 1, 2019 07:51 — forked from rantav/README.md
Find slow queries in mongo DB

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

#!/usr/bin/python3
class ListNode():
def __init__(self, x):
self.val = x
self.next = None
head = ListNode(-1)
tmp = head
@Jay87682
Jay87682 / jsmem.md
Created November 20, 2018 09:19 — forked from justinbmeyer/jsmem.md
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
for i in {0..255}; do printf "\x1b[38;5;${i}mcolor%-5i\x1b[0m" $i ; if ! (( ($i + 1 ) % 8 )); then echo ; fi ; done