Skip to content

Instantly share code, notes, and snippets.

@tavimori
tavimori / latex2bb.md
Last active April 6, 2022 15:57
将latex题目渲染到blackboard上

步骤一

在BB编辑框中选择HTML源代码模式,首先粘贴如下代码[^1],导入MathJax渲染组件:

<p>
<script type="text/javascript" async="" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
</p>
@tavimori
tavimori / LGUCampus.list
Last active April 18, 2019 03:35
Surge Ruleset for LGU Campus Network
DOMAIN-SUFFIX,cuhk.edu.cn
@tavimori
tavimori / LGULibrary.list
Last active January 28, 2021 00:51
Surge Rule Specific for LGU
// Domestic Publisher
DOMAIN-KEYWORD,cnki.net
DOMAIN-KEYWORD,wanfangdata
DOMAIN-SUFFIX,archive.nstl.gov.cn
DOMAIN-SUFFIX,nssd.org
// International Publisher
DOMAIN-SUFFIX,sciencedirect.com
DOMAIN-SUFFIX,researchgate.net
DOMAIN-SUFFIX,springer.com
@tavimori
tavimori / wifi24.sh
Created December 28, 2018 11:24
wifi24
########### on all devices #########
# install the driver for rtl-8811
sudo apt install rtl8812au-dkms
# load the driver
sudo modprobe 8812au
# disable network manager
sudo systemctl stop NetworkManager && sudo systemctl disable NetworkManager
########### on ap only #############
@tavimori
tavimori / automorphism.py
Created November 20, 2018 16:36
count of automorphism for CSC3001 Assignment 3
#!/usr/bin/env python3
from itertools import permutations
'''
for a permutation to be valid
A - B
A - C
A - D
B - E
B - G
@tavimori
tavimori / it.py
Last active January 14, 2019 13:25
A faster way for CSC1002
import math
import itertools
possible_set = set()
def check_match(guess, target):
count_exact = 0
count_guess = 0
for i in range(4):
@tavimori
tavimori / api
Created November 17, 2017 20:20
[POST]
http://sysprint.cuhk.edu.cn:8119/console/printManager
action_name:GetJobListByUser
user_name:dengyangzhou
import requests
import json
url = "http://cloudprint.cuhk.edu.cn/mobileproxy/printersdetail"
req = requests.get(url)
req.encoding = 'utf-8'
a = req.text
# print(req.encoding)
b = json.loads(a)
@tavimori
tavimori / keybase.md
Last active October 30, 2017 16:15
keybase.md

Keybase proof

I hereby claim:

  • I am tavimori on github.
  • I am tavimori (https://keybase.io/tavimori) on keybase.
  • I have a public key ASBfLU9wlue3am-TsdQw2hT8-SXZw0LxZvSBf4Z02V51zAo

To claim this, I am signing this object:

@tavimori
tavimori / helloworld.py
Created November 23, 2016 14:39
Only a helloworld!
print("Hello World!")