Stratum挖矿协议: 该协议是由SlushPool制定的,请参阅其官方文档:https://slushpool.com/help/manual/stratum-protocol
以下所有报文均使用\n做为行结束符。
矿机订阅:
{"id": 1, "method": "mining.subscribe", "params": []}| // ==UserScript== | |
| // @name Youdao Dictionary Add Word to Wordbook | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description Add selected word to Youdao Dictionary wordbook | |
| // @author You | |
| // @match https://dict.youdao.com/* | |
| // @grant none | |
| // ==/UserScript== | 
| // ==UserScript== | |
| // @name Doubao Custom Shortcut Script | |
| // @namespace http://www.doubao.com | |
| // @version 0.1 | |
| // @description Listen for custom keyboard shortcuts on doubao.com | |
| // @author Your Name | |
| // @match https://www.doubao.com/* | |
| // @updateUrl https://gist.githubusercontent.com/zhangheli/61cdce57a1bb586b3ed7315e6128f6e1/raw/cebc96453061e3588e8a558dba32268b4f3e4acb/tampermonkey-clear-session.js | |
| // @grant none | |
| // ==/UserScript== | 
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| def get_dir_size(path): | |
| total_size = 0 | |
| for dirpath, dirnames, filenames in os.walk(path): | |
| for f in filenames: | |
| fp = os.path.join(dirpath, f) | |
| if os.path.exists(fp): | 
| // ==UserScript== | |
| // @name Perplexity Timer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.0.1 | |
| // @description Perplexity timer and request sender | |
| // @author You | |
| // @match https://*.perplexity.ai/ | |
| // @grant none | |
| // @updateURL https://gist.githubusercontent.com/zhangheli/7e4e9f276404b12d2ce6cab0e149f47f/raw/pplx.js | |
| // @downloadURL https://gist.githubusercontent.com/zhangheli/7e4e9f276404b12d2ce6cab0e149f47f/raw/pplx.js | 
Stratum挖矿协议: 该协议是由SlushPool制定的,请参阅其官方文档:https://slushpool.com/help/manual/stratum-protocol
以下所有报文均使用\n做为行结束符。
矿机订阅:
{"id": 1, "method": "mining.subscribe", "params": []}| _IP=(ip a | grep -A 2 eth0 | perl -ne '/inet (\S+)\// && print $1') | |
| _TOKEN="" | |
| curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'domain=psched.pw&sub_domain=intranet&value='$_IP'&format=json&record_id=274750567&record_line=默认&login_token='$_TOKEN "https://dnsapi.cn/Record.Ddns" | 
| import random | 
| # encoding: utf-8 | |
| import os | |
| import sys | |
| import logging | |
| import requests | |
| from StringIO import StringIO | |
| s = requests.Session() | |
| access_token = os.environ["access_token"] | |
| cookie = os.environ["cookie"] | 
| {{google_ip}} www.google.com | |
| {{google_ip}} www.google.com.hk | |
| {{google_ip}} google.com | |
| {{google_ip}} chrome.google.com | |
| {{google_ip}} scholar.google.com | |
| {{google_ip}} groups.google.com | |
| {{google_ip}} plus.google.com | |
| {{google_ip}} accounts.google.com | |
| {{google_ip}} oauth.google.com | |
| {{google_ip}} mail.google.com | 
| i(){ | |
| apt-get install -y $* | |
| } | |
| r(){ | |
| # if memory is not enough , can run as `bash -c` | |
| screen -dm $* | |
| } | |
| i python-pip screen |