Skip to content

Instantly share code, notes, and snippets.

@bookfere
bookfere / fix-google-translate-cn.bat
Last active June 16, 2025 20:18
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"
@bookfere
bookfere / fix-google-translate-cn.sh
Last active June 2, 2025 08:06
Fix Google Translate CN for macOS
#!/bin/bash
# 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
set -e
IPS=(
74.125.137.90
#This gist expects msys git installed in path ${env:ProgramFiles(x86)}\Git\
$title = "Create CoreOS Docker host for Hyper-V"
$message = "Are you sure you want to start the setup for CoreOS, please ensure msys git has been installed first?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
"Confirm msys git is installed and it is safe to proceed with setup."
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
"Cancel setup."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 0)
switch ($result)