Skip to content

Instantly share code, notes, and snippets.

View pplmx's full-sized avatar
💭
Thinking

Mystic pplmx

💭
Thinking
View GitHub Profile
@pplmx
pplmx / $PROFILE
Last active March 28, 2026 12:42
for ohmyposh theme config
# =========================================================
# PowerShell 7 Modern CLI Profile
# =========================================================
$ProfileLoadStart = Get-Date
# -------------------------------
# PSReadLine — 输入体验基础
# -------------------------------
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
@pplmx
pplmx / oh-my-opencode.jsonc
Created January 27, 2026 11:43
Oh My OpenCode
{
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
// ============================================================================
// 🎯 终极优化配置 - 基于 NVIDIA 实际可用模型
// ============================================================================
// 策略:
// 1. Sisyphus 用 Opus 4.5(官方强烈推荐,质量至关重要)
// 2. 高频任务用 Gemini Flash(体验优先)
// 3. 其他任务充分利用 NVIDIA 40 RPM 免费额度
# 灵活的Ollama模型下载脚本
param(
[Parameter(Mandatory = $false, Position = 0)]
[string]$ModelName
)
# 检查是否提供了模型名称参数
if (-not $ModelName) {
Write-Host "请提供要下载的模型名称,例如:`n .\download_ollama.ps1 deepseek-r1:7b"
exit 1
@pplmx
pplmx / config
Last active December 31, 2024 05:43
~/.ssh/config Speeding up SSH Connection Creation
Host *
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 30
Compression yes
ControlMaster auto
ControlPath /tmp/%r@%h:%p
ControlPersist 8h
# StrictHostKeyChecking no
PreferredAuthentications publickey,password
@pplmx
pplmx / aurora.omp.json
Last active October 29, 2024 09:37
Aurora Theme: oh my posh Customize Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{.UserName}}@{{.HostName}} in {{ .PWD }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
# set RemoteSigned for CurrentUser
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# install scoop
iwr -useb get.scoop.sh | iex
scoop config proxy localhost:7890
# scoop config rm proxy
scoop bucket add main
scoop bucket add extras
scoop bucket add java
@pplmx
pplmx / proxy.sh
Last active December 15, 2023 01:58
simplify some common proxy config
#!/bin/bash
# define color
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
function enable_proxy() {
git config --global http.proxy "$1"
git config --global https.proxy "$1"
@pplmx
pplmx / Makefile
Last active November 16, 2023 08:26
define a retry_command function in Makefile
# retry command with max retries and sleep time
# Notes: No Spaces between commas
# usage: $(call retry_command, command[,max_retries[,sleep_time]])
# example1: $(call retry_command, command -v jx,3,1s)
# example2: $(call retry_command, command -v jx)
# example3: $(call retry_command, command -v jx,3)
define retry_command
@max_retries=$(or $(2),10); \
sleep_time=$(or $(3),5s); \
retries=0; \
@pplmx
pplmx / Makefile
Last active September 4, 2023 02:27
Makefile help generator
.PHONY: help
.DEFAULT_GOAL := help
# Show help
help:
@echo ""
@echo "Usage:"
@echo " make [target]"
@echo ""
@echo "Targets:"
@pplmx
pplmx / scoop.md
Last active June 1, 2023 10:01
install some necessary packages for developer

scoop

install scoop

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex

# You can use proxies if you have network trouble in accessing GitHub, e.g.
irm get.scoop.sh -Proxy 'http://' | iex