Skip to content

Instantly share code, notes, and snippets.

@worksg
worksg / tspkgen.py
Created September 30, 2025 06:11 — forked from WitherOrNot/tspkgen.py
Terminal Services License Server ID + License Key Pack generator
from Crypto.Cipher import ARC4
from hashlib import sha1, md5
from random import randint
from ecutils.core import Point, EllipticCurve
from sys import argv
KCHARS = "BCDFGHJKMPQRTVWXY2346789"
SPK_ECKEY = {
"a": 1,
@worksg
worksg / gist:884105f4e6646ce3585588f340265adc
Created July 20, 2019 03:35
compile cephfs-hadoop in china
git clone https://github.com/worksg/cephfs-hadoop.git
cd cephfs-hadoop
docker run --net=host --rm -it -v $(pwd):/workspace \
-e LOCAL_MAVEN_MIRROR=http://maven.aliyun.com/nexus/content/groups/public/ \
-w /workspace maven:3-jdk-8 /bin/bash
echo "deb http://mirrors.aliyun.com/debian stretch-backports main" >> /etc/apt/sources.list \
&& sed -i 's#security.debian.org#mirrors.aliyun.com#g' /etc/apt/sources.list \
@worksg
worksg / compile WireGuard on CentOS 6
Last active December 27, 2018 14:20
compile WireGuard on CentOS 6.10 and Kernel 4.18.20-1.el6.elrepo.x86_64
yum install -y elfutils-libelf-devel libmnl-devel
yum install -y kernel-headers
# install GCC 4.4.7
yum install -y gcc gcc-c++
hash -r && gcc --version && g++ --version
# WireGuard version between 20170613 and 20180202
wget https://git.zx2c4.com/WireGuard/snapshot/WireGuard-0.0.20180202.tar.xz
xz -d WireGuard-0.0.20180202.tar.xz