Skip to content

Instantly share code, notes, and snippets.

View zh4n7wm's full-sized avatar
🎯
Focusing

Hydra zh4n7wm

🎯
Focusing
View GitHub Profile
from tk: https://weibo.com/1401527553/Pw29YciMJ
粉丝群里有人说自己安装某“精简版” Windows 10,结果发现里面被塞了一些国产软件,还卸载不掉。就好像在直播间买了减肥药,吃完之后屁股上的肉确实下去了,但脸上鼓出几块肉来。
我之前说过,现在的 CPU 性能相对软件来说是过剩的,硬盘也便宜,所以如今再安装“精简版”的意义不是很大。但如果出于某些原因确实要折腾的话,可以考虑以下开源的 Windows 定制项目:
AME Wizard(github.com/Ameliorated-LLC),基于被称作 Playbook 的 YAML 脚本对已安装 Windows 进行深度定制的工具。下面提到的 ReviOS、AtlasOS、RapidOS 都和这个项目有关联。使用 AME Wizard 甚至可以把 Windows Update 都删掉,得到一个静默状态下不产生任何网络连接、难以被跟踪的 Windows 系统。
ReviOS(github.com/meetrevision), 专门为游戏需求定制的 Windows。提供已经定制好的 Windows 安装镜像,同时也提供基于 AME Wizard 的 Playbook 可以对已安装的 Windows 进行精简。
@zh4n7wm
zh4n7wm / age-tips.md
Created March 21, 2025 04:00
age tips

今天需要通过 IM (微信等)给其他人发消息,但又不希望 IM 公司拿到数据。

如果是程序员的话,直接用下面的命令:

加密后发送:

curl https://github.com/{username}.keys| age -R - config.dev.yaml > config.dev.yaml.age
@zh4n7wm
zh4n7wm / stt.md
Last active March 9, 2025 06:36
Speech to Text (音频转文字)
@zh4n7wm
zh4n7wm / delAllOssBuckets.md
Last active March 5, 2025 02:52
delete aliyun all oss buckets

delete all oss bucket from your aliyun account. (At Your Own Risk)

#!/bin/bash

for x in $(aliyun oss ls oss:// | grep -- 'oss-' | awk '{printf "%s|%s\n", $5, $7}'); do
    endpoint=$(echo "$x" | cut -d'|' -f1)
    bucket=$(echo "$x" | cut -d'|' -f2)
    echo "delete $bucket ..."
 aliyun oss rm "$bucket" -f -r --all-versions -b -e "$endpoint.aliyuncs.com"
@zh4n7wm
zh4n7wm / m3u8-to-mp4.md
Created December 3, 2024 05:48 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@zh4n7wm
zh4n7wm / download-wechat-video.md
Last active March 12, 2025 09:37
下载 微信视频号、网页中的视频文件
@zh4n7wm
zh4n7wm / print-jenkins-secret-file-contents.groovy
Created October 8, 2024 07:28 — forked from briceburg/print-jenkins-secret-file-contents.groovy
Print content of secret files from the Jenkins Credentials Store
import com.cloudbees.plugins.credentials.*;
import com.cloudbees.plugins.credentials.domains.Domain;
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl;
//
// modify fileName to match the filename of the secret(s) you want to print.
// (ID would probably be more helpful... yay stack overflow copy pasta)
// alternatively comment out the filter [line 15] to dump all secret files.
//
def fileName = "secrets.env"
@zh4n7wm
zh4n7wm / aws-rds-failed.md
Created September 11, 2024 02:02
AWS RDS The vector database encountered an error while processing the request: The request was throttled because of insufficient resources on the database.

error message

botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the Retrieve operation: The vector database encountered an error while processing the request: The request was throttled because of insufficient resources on the database. (Service: RdsData, Status Code: 400, Request ID: b762f4a8-177c-4ba4-abd7-bd36b8fc17f4)

refs: https://repost.aws/questions/QUudolCeyiSDq_ZLmARgkIug/aurora-serverless-v2-the-request-was-throttled-because-of-insufficient-resources-on-the-database

action: Databases -> choose your RDS -> Connectivity & security -> RDS Data API , disable and then re-enable

@zh4n7wm
zh4n7wm / list-and-download-aws-s3-object-in-bucket.md
Created June 17, 2024 00:45
list and download the object in the aws s3 bucket

import json import pathlib

import boto3

def download_s3_obj_versions(_bucket, _key_prefix, _filename, is_save=True): client = boto3.client("s3")

_key = (pathlib.Path(_key_prefix) / _filename).as_posix()

@zh4n7wm
zh4n7wm / manifests.yaml
Created May 27, 2024 23:19 — forked from alexeldeib/manifests.yaml
crictl image cleanup
apiVersion: v1
kind: ConfigMap
metadata:
name: imagecleanupconfig
namespace: default
labels:
component: imagecleanup
data:
# removes all images unused by a running container
cronjobs: 0 0 * * * crictl rmi --prune 2>&1