Skip to content

Instantly share code, notes, and snippets.

View david4958606's full-sized avatar
🎯
Focusing

David Wang david4958606

🎯
Focusing
View GitHub Profile
import os
import sys
import chardet
def get_encoding(file):
with open(file, 'rb') as f:
return chardet.detect(f.read())['encoding']
@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"
},
@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