Skip to content

Instantly share code, notes, and snippets.

View jahentao's full-sized avatar

Jiaheng Tao jahentao

  • HangZhou, Zhejiang
View GitHub Profile
@hygull
hygull / LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143.md
Last active October 14, 2025 15:41
LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@zhanghai
zhanghai / 0-zju-network-configuration.md
Last active November 24, 2019 10:34
浙江大学 VPN 及 ZJUWLAN 网络配置
  1. 检查是否已有 ~/bin 目录(~ 即是家目录)。如果没有:   0. 创建目录:mkdir ~/bin。   1. 编辑 ~/.bashrc,加入 export PATH="$HOME/bin:$PATH"。   2. 退出终端并重新打开以使新的 ~/.bashrc 生效(或者执行 source ~/.bashrc)。

ZJUVPN

  1. 下载 https://github.com/DreaminginCodeZH/zju-net-utils/raw/master/src/zjuvpn.sh~/bin/zjuvpn(不带扩展名,用起来方便),并使用 chmod +x ~/bin/zjuvpn 添加可执行权限。
  2. 安装 xl2tpd:sudo pacman -S xl2tpd
  3. 配置 ppp
@dentechy
dentechy / WSL-ssh-server.md
Last active May 9, 2025 02:32
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@orenyomtov
orenyomtov / update-gcc-clang-8-ubuntu-16.04-xenial.sh
Created March 31, 2019 12:42
Update clang to 8.0 and gcc to 8.0 on Ubuntu xenial 16.04
if [ ! -f /usr/bin/gcc-8 ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-8 g++-8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 1000
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 1000
fi
if [ ! -f /usr/bin/gcc-8 ]; then
@jahentao
jahentao / do_login.sh
Last active April 10, 2019 09:06
浙江大学(宁波校区)软件学院_上网验证 #Util
# 采用curl命令行方式
# 我的用户名 21851075,密码 123456ABC
username=21851075
password=123456ABC
pass1=$(echo -n $password | md5sum |cut -d ' ' -f1)
pass2=$(echo ${pass1:8:16})
curl -H "Content-Type: application/x-www-form-urlencoded" \
-b srun_login=$username%7C$password \
-A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36" \
-d "username=$username&password=$pass2&drop=0&type=1&n=100" \