- 安裝 tempermonkdy
- 點擊 連結
整個程式分成兩個部份,首先是主要部份,網路爬蟲,會根據儲存的目標定期去選課系統抓指定課程剩餘人數,如果有變化就會通知使用者
第二部份是使用者界面,telegram 聊天機器人,透過指令的方式可以新增、刪除、列出要監聽的頁面跟指定欄位
這個聊天機器人支援多使用者,各自的資料不會互相影響,是分開儲存的
打開 Telegram,找到機器人 https://t.me/nckubot ,使用指令 /listen <url> [selector]
新增一筆紀錄,接著機器人就會每隔一段時間去抓看看有沒有變更
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 | |
# author: simbafs | |
# date: 2022-08-30 | |
# MIT License | |
IPFS="${IPFS:-$(which ipfs)}" | |
KEY="${KEY:-q8s}" | |
# this line will be changed by the script | |
PKEY="${PKEY:-"k51qzi5uqu5dg9y6e55vjfb583rdoshtko6qizgk7nde9ybm9gyor5ujpfb9m2"}" | |
DIR="${DIR:-.}" |
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
# example: /usr/share/doc/tmux/examples/ | |
# {{{ screen-keys.conf | |
# $Id: screen-keys.conf,v 1.7 2010/07/31 11:39:13 nicm Exp $ | |
# | |
# By Nicholas Marriott. Public domain. | |
# | |
# This configuration file binds many of the common GNU screen key bindings to | |
# appropriate tmux key bindings. Note that for some key bindings there is no | |
# tmux analogue and also that this set omits binding some commands available in | |
# tmux but not in screen. |
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 | |
# credit: simba-fs | |
# | |
# color | |
BLUE='\033[1;34m' | |
NC='\033[0m' # No Color | |
wireless=0 | |
ip=192.168.43.1 |
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
name: Hexo | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: |
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
ifconfig | egrep 'inet ' | sed 's/ inet //' | sed 's/ netmask .*//' |
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
declare -a cmd; | |
cmd+=('sudo apt update') | |
cmd+=('sudo apt install -y nmap net-tools mtr') | |
for i in ${!cmd[@]};do | |
echo "> ${cmd[$i]}" | |
${cmd[$i]} | |
done |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main(){ | |
int _n; | |
cin >> _n; | |
for(int _i; _i < _n; _i++){ | |
int data[1005][1005] = {{}}; |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main(){ | |
int _n; | |
cin >> _n; | |
for(int _i; _i < _n; _i++){ | |
int data[1005][1005] = {{}}; |
NewerOlder