Skip to content

Instantly share code, notes, and snippets.

View david4958606's full-sized avatar
🎆
Happy 2025!

David Wang david4958606

🎆
Happy 2025!
View GitHub Profile
@david4958606
david4958606 / rclone.sh
Created April 27, 2021 15:13
Generate rclone command
#!/bin/bash
#自动 rclone 到指定网盘 upload 文件夹下同名目录
#用法:rclone.sh <source path> <net disk> <threads>
src=$1
src=${src%?}
file=`echo $src | awk -F "/" '{print $NF}'`
disk=$2
upload="$2:/upload/${file}"
threads=$3
@david4958606
david4958606 / vapoursynth.code-workspace
Created April 27, 2021 15:18
Workspace settings for vapoursynth and vscode
{
"folders": [
{
"path": "..\\VSscript"
}
],
"settings": {
"files.associations": {
"*.vpy": "python"
},
import os
import sys
import chardet
def get_encoding(file):
with open(file, 'rb') as f:
return chardet.detect(f.read())['encoding']
# 编译器和汇编器
CC = gcc
NASM = nasm
# 编译、汇编和链接选项
# -nostdlib 和 -nostartfiles 用于防止引入系统启动文件和标准库
CFLAGS = -static -O2 -nostdlib -nostartfiles -Wall -Wextra -m64
LDFLAGS = -static -m64 -nostdlib -nostartfiles
ASMFLAGS = -f elf64