Skip to content

Instantly share code, notes, and snippets.

View limcheekin's full-sized avatar

Lim Chee Kin limcheekin

View GitHub Profile
@limcheekin
limcheekin / generate_jwt.sh
Created June 24, 2025 09:22
Generate JWT token for mcp-context-forge
pip install mcp-contextforge-gateway
python -m mcpgateway.utils.create_jwt_token --username admin --secret JWT_SECRET_KEY
@limcheekin
limcheekin / gemini_deep_research.md
Created June 12, 2025 11:28
The way I use Gemini Deep Research

My way of using Gemini Deep Research:

  1. Enter the research topic: Systematically improving AI Agents Performance on Revenue Generation, Cost Saving and Operational Efficiency
  2. Once the research report is generated, I use the following prompt "Carefully review the report in detail, think deeper for all potential improvements." to make sure it didn't missed anything.
  3. Depends on the response, sometimes it comes back with updated report, but sometimes comes back with list of improvements. If it is "list of improvements". I prompt it "Create an updated version of the entire report incorporating all suggested improvements."
  4. Then, I prompt it to final check "Carefully review the updated report in detail, could you think for any further improvement?".

Please share in comment section if you have better way to use it.

Thank you.

@limcheekin
limcheekin / drop-all-tables.sql
Created June 12, 2025 11:25
Generate drop all table statements in postgres
select 'drop table if exists "' || tablename || '" cascade;'
from pg_tables
where schemaname = 'public';
@limcheekin
limcheekin / gemini_implicit_caching.sh
Created May 13, 2025 08:57
Gemini 2.5 OpenAI-compatible implicit caching support
#!/bin/bash
# --- Configuration ---
API_ENDPOINT="https://generativelanguage.googleapis.com/v1beta/openai/chat/completions" # Replace with the actual endpoint (e.g., from Google AI Studio, a third-party provider, etc.)
API_KEY="Your Gemini API Key" # Replace with your actual API key
FILE_PATH="report.md" # Replace with the path to your large text file
MODEL_NAME="gemini-2.5-flash-preview-04-17" # Replace with the specific Gemini 2.5 model name supported by your endpoint
# --- Construct JSON Payload using jq ---
# Reads the file content and embeds it as a string within the JSON
@limcheekin
limcheekin / chinese_prompt_template.md
Created May 9, 2025 06:15
How do I use NotebookLM and Gemini to help me study?

操作提示模板

原始资料来源:
{{在此插入资料清单,例如标题、网址、文件路径等}}


  1. 提取最重要的20%内容
    • 仔细分析所有提供的原始资料。
  • 运用 80/20 原则,识别并提取最关键的20%内容。
@limcheekin
limcheekin / docx_to_md.sh
Created April 25, 2025 09:13
Convert docx to markdown using pandoc
# RegEx \s*\{width="[^"]*"\s*height="[^"]*"\} to replace the entire {width="..." height="..."} attribute block
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Check if an input file was provided
if [ -z "$1" ]; then
echo "Usage: $0 input.docx"
exit 1
@limcheekin
limcheekin / docker-compose.yml
Last active April 25, 2025 07:12
LiteLLM custom docker-compose.yml
services:
litellm:
image: ghcr.io/berriai/litellm:main-stable
#########################################
## Uncomment these lines to start proxy with a config.yaml file ##
# volumes:
# - ./config.yaml:/app/config.yaml <<- this is missing in the docker-compose file currently
# command:
# - "--config=/app/config.yaml"
##############################################
@limcheekin
limcheekin / pre-push
Last active April 9, 2025 02:11
pre-push with success callback script to trigger webhook for local coolify deployment
#!/bin/bash
# Store the original command
original_command="$@"
# Let the push happen first
eval "$original_command"
push_status=$?
# Only proceed if push was successful
@limcheekin
limcheekin / create_new_user_and_new_db.sql
Last active June 12, 2025 22:57
Create New User and New Database for the PostgreSQL
CREATE ROLE new_user WITH LOGIN PASSWORD 'your_secure_password';
CREATE DATABASE new_database OWNER new_user;
GRANT ALL PRIVILEGES ON DATABASE new_database TO new_user;
-- Example:
-- CREATE ROLE talking_book WITH LOGIN PASSWORD 'your_secure_password';
-- CREATE DATABASE think_and_grow_rich OWNER talking_book;
-- GRANT ALL PRIVILEGES ON DATABASE think_and_grow_rich TO talking_book;
-- #psql -U talking_book -d think_and_grow_rich
@limcheekin
limcheekin / convert_wav_to_mp3.sh
Created March 31, 2025 01:53
Convert all WAV files in the current directory and its subdirectories to MP3 using ffmpeg
find . -name "*.wav" -exec ffmpeg -i {} {}.mp3 \;