This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 kernel-version" | |
echo "kernel-version is the suffix of vmlinuz and initrd.img in /boot" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def partition($p): | |
{ | |
"less": (. | map(select(. < $p))), | |
"equal": (. | map(select(. == $p))), | |
"greater": (. | map(select(. > $p))) | |
}; | |
def qsort: | |
( | |
if (. | length | . <= 1) then . else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name shrinkme.io bypass | |
// @namespace qnnnnez@live.com | |
// @version 0.1 | |
// @description skip waitting for shrinkme.io links | |
// @author qnnnnez | |
// @match https://shrinkme.io/st* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locations = ['440305000000', '440305000001'] | |
start_date = '2023-03-03' | |
query_days = 7 | |
url = "https://msjw.ga.sz.gov.cn/crj/crjmsjw/wsyydata/getScheduleData" | |
import requests | |
import os | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def detect_charset(encoded_text, default=None): | |
""" | |
探测编码格式,只支持 gbk 或 utf-8 | |
:param default: 默认编码 | |
:param encoded_text: 待探测的二进制数据 | |
:return: | |
""" | |
# Python2 中,str 是字节串,unicode 才是字符串 | |
if not isinstance(encoded_text, str): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
import os | |
from enum import IntFlag | |
import errno | |
libc = cdll.LoadLibrary('libc.so.6') | |
class CloneFlag(IntFlag): | |
VM = 0x00000100 #/* set if VM shared between processes */ | |
FS = 0x00000200 #/* set if fs info shared between processes */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flowscript = ''' | |
查询结果 = 录取信息库.单条查询({ | |
“姓名” : 姓名输入框.内容, | |
“准考证号” : 准考证输入框.内容, | |
“身份证号” : 身份证输入框.内容, | |
}); | |
如果(查询结果){ | |
结果页.姓名文本.内容 = 查询结果.分数; | |
结果页.高考分数文本.内容 = 查询结果.分数; | |
结果页.录取结果文本.内容 = 查询结果.录取状态; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using https://github.com/Neilpang/acme.sh | |
acme.sh --issue -d your.domain.1 --alpn --tlsport 30443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AS := as | |
LD := ld | |
DOSBOX := dosbox | |
%.o: %.S | |
$(AS) --32 -o $@ $< | |
output.com: hello.o | |
$(LD) -T dos.ld -o $@ $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config | |
username = '' # your username used to login | |
user_id = int() # should be a integer | |
courseId = '' | |
cookie_xsid = '' # find it in your browser after logging in | |
finish_time = '' # e.g. 20181222 | |
parentId = '' | |
NewerOlder