Skip to content

Instantly share code, notes, and snippets.

@ageis
ageis / systemd_service_hardening.md
Last active December 19, 2025 07:46
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@Andrey2G
Andrey2G / encoding.txt
Last active December 19, 2025 07:40
Video Encoding with multiple resolutions
ffmpeg -i "c:/videos/sample.mp4
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0
-c:v libx264 -crf 22 -c:a aac -ar 48000
-filter:v:0 scale=w=480:h=360 -maxrate:v:0 600k -b:a:0 64k
-filter:v:1 scale=w=640:h=480 -maxrate:v:1 900k -b:a:1 128k
-filter:v:2 scale=w=1280:h=720 -maxrate:v:2 900k -b:a:2 128k
-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:480p v:2,a:2,name:720p"
-preset slow -hls_list_size 0 -threads 0 -f hls -hls_playlist_type event -hls_time 3
-hls_flags independent_segments -master_pl_name "name-pl.m3u8"
"c:/videos/encoded/name-%v.m3u8"
@FelikZ
FelikZ / rgb-fix.sh
Last active December 19, 2025 07:40
Fix RGB Range Limit on MacOS
#!/usr/bin/env bash
# Script to force RGB Color Output on M1 and M2 based Macs for a selected display
# Function to display an error message and exit
function error_exit {
echo "Error: $1" >&2
exit 1
}
Visual Studio 2026 18.x
Professional: NVTDK-QB8J9-M28GR-92BPC-BTHXK
Enterprise: VYGRN-WPR22-HG4X3-692BF-QGT2V
Product Year Version Product Keys
Visual Studio 2022 2021 17.x
Professional: TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
Enterprise: VHF9H-NXBBB-638P6-6JHCY-88JWH
Visual Studio 2019 2019 16.x
@philschmid
philschmid / GEMINI.md
Last active December 19, 2025 07:38
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:

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@ariel-frischer
ariel-frischer / spec-comparison.md
Created December 19, 2025 06:52
Spec-Driven vs Prompt-Driven Comparison Report

Spec-Driven vs Prompt-Driven Comparison Report

Date: 2025-12-18
Last Updated: 2025-12-18 23:45 UTC
Model: Claude Opus 4.5 (claude-opus-4-5-20251101) for both approaches
Projects Evaluated: 6 projects (URL Shortener, Linkcheck, Git Hooks Manager, Env Validator, API Mock Server, Cron Parser)
Methods: autospec all (spec-driven) vs claude -p (prompt-driven)


@Artefact2
Artefact2 / README.md
Last active December 19, 2025 07:27
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggml-org/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@sunny352
sunny352 / rules.md
Last active December 19, 2025 07:23
Cursor rules

智能编程助手协议 v2.0

1. 角色

首席软件架构师,信奉 "Less is More"。

  • 动手前必须先理解现有系统纹理
  • 删除代码优先于增加代码
  • 遇到复杂递归、并发、算法设计等 LLM 能力边界场景时,必须降速并多次验证

2. 核心哲学