Skip to content

Instantly share code, notes, and snippets.

(defun my/gptel-gen-hugo-properties ()
"Generate Hugo export properties for current Org heading."
(interactive)
(unless (org-at-heading-p) (user-error "Must be at an Org mode heading"))
(gptel-request
(format "Convert Chinese title to English slug (lowercase, hyphen-separated):
Original text to translate: \"%s\""
(string-trim (org-get-heading t t t t)))
:system "Return only the converted string"
# Cline's Memory Bank
I am Cline, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.
## Memory Bank Structure
The Memory Bank consists of core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:
flowchart TD
PB[projectbrief.md] --> PC[productContext.md]
@nailuoGG
nailuoGG / custom_llm.txt
Created March 26, 2025 05:27
Cline's Memory Bank
# Cline's Memory Bank
I am Cline, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.
## Memory Bank Structure
The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:
```mermaid
flowchart TD
@nailuoGG
nailuoGG / position.el
Created February 26, 2025 01:49
Set the frame to golden ratio dimensions and center it on screen.
(defun get-frame-dimensions (frame)
"Get the width and height of FRAME from its edges."
(let* ((edges (frame-edges frame))
(x (nth 0 edges))
(y (nth 1 edges))
(width (- (nth 2 edges) x))
(height (- (nth 3 edges) y)))
(cons width height)))
(defun get-primary-display-geometry ()
@nailuoGG
nailuoGG / stop_new_sh
Created November 29, 2024 14:34
CursorUIViewService Frozen no Response
#https://www.reddit.com/r/MacOS/comments/16vmjfc/comment/kcq6nql/
sudo mkdir -p /Library/Preferences/FeatureFlags/Domain && sudo /usr/libexec/PlistBuddy -c "Add 'redesigned_text_cursor:Enabled' bool false" /Library/Preferences/FeatureFlags/Domain/UIKit.plist
You should Reboot to take effect
# sudo shutdown -r now
@nailuoGG
nailuoGG / create_swap.sh
Created November 15, 2024 09:44
create_swap.sh
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
@nailuoGG
nailuoGG / docker-disk-optimizer.sh
Last active November 15, 2024 09:38
clean unused docker image and container
#!/bin/bash
echo "============================"
echo " Docker Disk Usage Optimizer"
echo "============================"
echo
# Function to display disk usage
display_disk_usage() {
echo "Current Docker Disk Usage:"
@nailuoGG
nailuoGG / ollama_model_list.txt
Created October 12, 2024 05:31
Ollama Model
➜ ollama list
NAME ID SIZE MODIFIED
Violet_Twilight-v0.1:q8_0 e049e9e77646 13 GB 2 weeks ago
Star-Command-R-32B-v1:Q5_K_M 1f7f85bca6c5 23 GB 2 weeks ago
magnum-v3-34b:Q5_K_M 631c48934236 24 GB 2 weeks ago
llama3.1_8_chinese:q8_0 5f33642ca608 8.5 GB 2 weeks ago
hermes-3-llama-3.1-8b:Q8_0 167459145e7d 8.5 GB 2 weeks ago
opencrystal-15b:l3-v2-q8 43a18ad5855c 15 GB 2 weeks ago
Cydonia-22B:Q5_K_M a0465abf2ebe 15 GB 2 weeks ago
qwen2.5-coder:7b-instruct-q8_0 7f83705f49dd 8.1 GB 3 weeks ago
@nailuoGG
nailuoGG / 1_get_words_from_dwarf_fortress.py
Last active January 12, 2024 10:08
矮人要塞 生词 制作anki 卡牌
import requests
from bs4 import BeautifulSoup
import csv
def fetch_and_convert(url):
# Fetch the web page content
response = requests.get(url)
if response.status_code != 200:
return "Failed to retrieve the webpage."
@nailuoGG
nailuoGG / README.md
Last active September 6, 2023 07:41
如何迅速从小程序工程中检查出哪些代码使用了微信隐私api。https://liujiale.me/

如何迅速从工程中检查出哪些代码使用了微信隐私api

install 安装

brew install ripgrep

download private api list