Skip to content

Instantly share code, notes, and snippets.

View TurnOffNOD's full-sized avatar

Thomas Copper TurnOffNOD

  • University of Chinese Academy of Sciences
  • HangZhou
View GitHub Profile
@TurnOffNOD
TurnOffNOD / kms
Created August 12, 2018 21:49 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
@TurnOffNOD
TurnOffNOD / apikeys
Created September 24, 2019 16:08 — forked from csrutil/apikeys
Chromium API Keys
# Download from
# http://security.debian.org/debian-security/pool/updates/main/c/chromium-browser/chromium-browser_60.0.3112.78-1~deb9u1.debian.tar.xz
# API keys assigned to Debian by Google for access to their services like sync and gmail.
# *nix
export GOOGLE_API_KEY="AIzaSyCkfPOPZXDKNn8hhgu3JrA62wIgC93d44k"
export GOOGLE_DEFAULT_CLIENT_ID="811574891467.apps.googleusercontent.com"
export GOOGLE_DEFAULT_CLIENT_SECRET="kdloedMFGdGla2P1zacGjAQh"
# OSX
@TurnOffNOD
TurnOffNOD / branch_prompt.sh
Last active June 11, 2022 12:31
Show the current Git or Mercurial branch in your Bash prompt
## Print nickname for git/hg/bzr/svn version control in CWD
## Optional $1 of format string for printf, default "(%s) "
function be_get_branch {
local dir="$PWD"
local vcs
local nick
while [[ "$dir" != "/" ]]; do
for vcs in git hg svn bzr; do
if [[ -d "$dir/.$vcs" ]] && hash "$vcs" &>/dev/null; then
#!/usr/bin/python3
from pathlib import Path
from threading import Timer
cpu_temp_file = "/sys/class/thermal/thermal_zone0/temp"
duty_cycle_file = "/sys/class/pwm/pwmchip0/pwm0/duty_cycle"
temp_wall = 65000
lowest_fan_speed = 3000
def read_cpu_temp():