Skip to content

Instantly share code, notes, and snippets.

@ak1ra-komj
ak1ra-komj / uBlacklist.txt
Last active October 9, 2021 10:00
uBlacklist block list
/.+\.baidu\.com/
/.+\.csdn\.net/
/.+\.jianshu\.com/
/.+\.zhihu\.com/
/yq\.aliyun\.com/
/developer\.aliyun\.com\/article/
/cloud\.tencent\.com\/developer/
/.+\.mbalib\.com/
title/小[\u4e00-\u9fa5](:?百科|知识|养生|健康)网/
@ak1ra-komj
ak1ra-komj / settings.json
Last active August 11, 2023 07:03
vscode-settings-with-background
{
"background.customImages": [
"https://i.loli.net/2020/06/11/sHdtowgryvk8Qeq.png",
"https://i.loli.net/2020/06/11/yfTGIBVMWXxR5cE.png",
"https://i.loli.net/2020/06/11/eSnE3mQYukBKsPt.png",
"https://i.loli.net/2020/06/11/29x4PdKmi7ApehI.png",
"https://i.loli.net/2020/06/11/YqjZbIB5hv4PKS3.png",
"https://i.loli.net/2020/06/11/Ru84bz5NnADWZLw.png",
"https://i.loli.net/2020/06/11/lswOX1IemtUrL6c.png",
"https://i.loli.net/2020/06/11/HrAeG5PqyfvnhwL.png",

adobe-fonts (Update 2024-06-06)

现代的操作系统直接下载 VF OTC 即可, 这样体积最小, 也不用下载很多文件, 现代操作系统已经做了很完整的支持.

[!quote] Select this deployment format if you want all five languages and all weights, along with the half-width (HW) variations, and your system supports both variable fonts and OTCs.

下面是一些缩写的解释,

  • OTF, OpenType Font, 文件后缀 .otf
@ak1ra-komj
ak1ra-komj / dds2webp.sh
Created October 29, 2021 15:35
GNU Parallel 实战: Using GNU Parallel + ImageMagick to convert .dds image
#! /bin/bash
# author: ak1ra
# date: 2021-10-29
# using GNU Parallel + ImageMagick to convert .dds image
function magick_convert() {
# ddsImage/ddsImage000000/CHU_UI_Character_0000_00_00.dds
src="$1"
format="$2"
resize="$3"
# Author: ak1ra
# Date: 2022-01-23
# 自动添加访问特定域名时使用 OpenVPN 网关作为下一条的路由
# 配置命令行选项
Param(
[string]$Action = "add",
[string]$Domain = "cloud.tencent.com",
[Parameter(Mandatory=$false)][Int32]$InterfaceIndex,
[string]$InterfaceDescription = "TAP-Windows Adapter V9",
# coding: utf-8
import re
import json
import logging
from telethon import TelegramClient, events
def init_logger(name, level=logging.INFO):
format = '[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s'
# clash core DNS sample config
# Wiki: https://github.com/Dreamacro/clash/wiki/configuration
# Unoffcial Wiki: https://lancellc.gitbook.io/clash/clash-config-file/dns
dns:
# 默认为 true
enable: true
# 是否启用 AAAA 查询
# 并不代表 clash 不会建立 IPv6 连接或者主动丢弃 AAAA 响应
ipv6: false
# clash DNS server 监听地址
# coding: utf-8
# A helper script to convert vol.moe's mobi files to 7zip archives.
# python3 -m pip install mobi py7zr
import argparse
import logging
import os
import shutil
import sys
import time
#! /bin/bash
# Check git lfs file's integrity in ~/.cache/huggingface/transformers by it etag
# Run this script in MINGW64 if you are on Windows
# Root of all evil: https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin
# I spent a whole day troubleshooting AUTOMATIC1111/stable-diffusion-webui bugs due to incomplete file downloads
# OSError: Unable to load weights from pytorch checkpoint file for '~/.cache/huggingface/transformers/c506559a5367a918bab46c39c79af91ab88846b49c8abd9d09e699ae067505c6.6365d436cc844f2f2b4885629b559d8ff0938ac484c01a6796538b2665de96c7'.
# If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
path=~/.cache/huggingface/transformers
@ak1ra-komj
ak1ra-komj / deepl.rs
Created February 19, 2023 12:56 — forked from andelf/deepl.rs
DeepL Rust command line
// https://zu1k.com/posts/thinking/deception-tactics-in-deepl-api-design/