Skip to content

Instantly share code, notes, and snippets.

@SuibianP
SuibianP / random-choice-norepeat.html
Last active December 14, 2020 18:31
随机连续抽取不重复数组元素的简易HTML静态网页
<!DOCTYPE html>
<!--
本HTML文档由胡佳伦(隋卞)编写。
脚本部分在GNU Affero通用公共许可协议版本3下公开,
其余部分在知识共享署名—相同方式共享4.0公共许可协议国际版下公开。
This HTML document is authored by Hu Jialun (SuibianP).
Scripts are licensed under GNU Affero General Public License version 3,
while other contents are distributed under Creative Commons Attribution-ShareAlike 4.0 International Public License.
-->
<html lang="zh-cmn-Hans-CN">
@SuibianP
SuibianP / batch_conversion.sh
Created December 13, 2020 18:14
Batch text file conversion from Shift-JIS to UTF-8 using Vim
vim "+bufdo edit ++enc=shift-jis | set fileencoding=utf8 | w" "+qa" $(find . -path ./.git -prune -o -type f -print)
@SuibianP
SuibianP / convert.sh
Last active October 25, 2020 06:32
Shell script resolution for garbled Chinese-encoded Japanese UTAU voicebanks
#!/bin/sh
for f in ./*
do
mv $f `echo $f | iconv -f UTF-8 -t GBK | iconv -f shift-jis -t UTF-8`
done