Skip to content

Instantly share code, notes, and snippets.

View Cccc-owo's full-sized avatar

Cccc_ Cccc-owo

View GitHub Profile
@bookfere
bookfere / fix-google-translate-cn.bat
Last active June 19, 2024 02:23
Fix Google Translate CN for Windows
:: Copyright (c)2022 https://bookfere.com
:: This is a batch script for fixing Google Translate and making it available
:: in the Chinese mainland. If you experience any problem, visit the page below:
:: https://bookfere.com/post/1020.html
@echo off
setlocal enabledelayedexpansion
chcp 437 >NUL
set "ips[0]=74.125.137.90"
@bruceCzK
bruceCzK / special-escape.js
Last active March 26, 2022 06:10
CK2SpecialEscapeNodeJs
// Ported from https://github.com/matanki-saito/EU4SpecialEscape/blob/master/ConsoleApplication3/ConsoleApplication3.cpp#L235
module.exports = function specialEscape(char, toUtf8, newVersion) {
// DO NOT escape valid char
if (char.codePointAt(0) < 256) {
return char
}
const hex = char.codePointAt(0).toString(16)
// default if UTF8, so hex is 4 length for most letters
// split low byte and high byte
// transform decimal to hex