Skip to content

Instantly share code, notes, and snippets.

View liruqi's full-sized avatar

Ruqi liruqi

View GitHub Profile
https://github.com/fanhongtao/IELTS 单词中的生词表 2023-03-16
Word List 01
regent /ˈriːdʒənt/ n. 摄政者(代国王统治者)
burgeon* /ˈbɜːdʒən/ vi. 迅速成长;发展
methane* /ˈmiːθeɪn/ n. 甲烷,沼气
chronic /ˈkrɔnɪk/ a. (疾病)慢性的;积习难改的
consortium* /kənˈsɔːtɪəm/ n. 集团;财团;社团,协会
buckle /ˈbʌkl/ n. 皮带扣环 v. 扣紧;(使)变形;弯曲
import taichi as ti
ti.init(arch=ti.gpu)
n = 320
pixels = ti.field(dtype=float, shape=(n * 2, n))
@ti.func
def complex_sqr(z):
return ti.Vector([z[0]**2 - z[1]**2, z[1] * z[0] * 2])
@liruqi
liruqi / block_aliyun.conf
Last active October 2, 2020 14:51
Block aliyun
/*
* https://myip.ms/view/ip_owners/179248/Aliyun_Computing_Co_Ltd.html
res = ""; for (i=0; i<41; i++) { console.log(arr[i].text); res = res + "\n" + arr[i].text; }
arr = $("table .JColResizer .row_name a")
101.132.0.0 - 101.133.255.255
101.200.0.0 - 101.201.255.255
101.37.0.0 - 101.37.255.255
106.14.0.0 - 106.15.255.255
@liruqi
liruqi / i.sh
Last active May 14, 2020 02:47
x-wrt
# https://github.com/x-wrt/x-wrt.github.io/tree/master/docs/install-on-vps
# Aliyun install script
if [ ! -f /root/x-wrt.img.gz ]; then
wget -O /root/x-wrt.img.gz --no-check-certificate https://downloads.x-wrt.com/rom/x-wrt-8.0-b202005101652-x86-64-generic-ext4-combined.img.gz
sed -i "s/errors\=remount-ro/ro/g" /etc/fstab
reboot
fi
vda1=`df -h|awk '{ if ($6 == "/") print $1 }'`
@liruqi
liruqi / facebook_email.js
Last active December 26, 2019 10:04
Get facebook fans email
var run = 0;
var mails = {}
total = 3000; //滚动次数,可以自己根据情况定义
function getEmails (cont) {
var friendbutton=cont.getElementsByClassName("_ohe");
for(var i=0; i<friendbutton.length; i++) {
var link = friendbutton[i].getAttribute("href");
if(link && link.substr(0,25)=="https://www.facebook.com/") {
@liruqi
liruqi / LRUCache.py
Created May 26, 2019 16:21
LRUCache
class LRUCache(collections.OrderedDict):
def __init__(self, capacity: int):
self.maxsize = capacity
def get(self, key: int) -> int:
if key in self:
value = super().__getitem__(key)
self.move_to_end(key)
@liruqi
liruqi / extract-testflight.js
Created October 10, 2018 08:38 — forked from creaoy/extract-testflight.js
Extract TestFlight user email addresses from iTunes Connect
//Make sure you scroll down to get all data loaded
var text = '';
$('.col-email').each(function(index,el) {
if (index == 0) {
text = 'Email, First Name, Last Name\n';
}
else {
//Email
text = text + $.trim($(el).find("a").text()) + ',';
//First Name
@liruqi
liruqi / ssserver.sh
Last active August 9, 2018 05:54
shadowsocks server setup
#Ubuntu 16.04
apt install -y python-pip
apt install -y libsodium-dev
pip install https://github.com/shadowsocks/shadowsocks/archive/master.zip
@liruqi
liruqi / iptables.conf
Created April 11, 2018 07:00
iptables disable non-http(s) traffic
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset
iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp --dport 443 -j ACCEPT
iptables -A FORWARD -p tcp -j REJECT --reject-with tcp-reset
@liruqi
liruqi / checkExpiredDomains.py
Created December 18, 2017 12:52
Check expired domains
import socket
import pprint
import sys
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--input', default='')
parser.add_argument('--output', default='output.txt')
args = parser.parse_args()