跳至主要內容
server安装node及node版本管理
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

设置环境变量

对上边输出的结果一行执行一条
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

爱喝水的木子...小于 1 分钟devnvmnodeserver
steam获取喜加一

获取喜加一

import requests
from bs4 import BeautifulSoup
 
#Server酱推送模块,PUSH_KEY替换自己的
def send_message_fangtang(_item,_message):
        PUSH_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'  #
        api = 'https://sctapi.ftqq.com/' + PUSH_KEY + '.send'
        _d = {
                "title": _item,
                "desp": _message
                }
        req = requests.post(api,data = _d)
        #print(req.text)
 
#爬取代码
url='https://steamstats.cn/xi'
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.41'}
 
r=requests.get(url,headers=headers)
r.raise_for_status()
r.encoding = r.apparent_encoding
soup = BeautifulSoup(r.text, "html.parser")
tbody=soup.find('tbody')
tr=tbody.find_all('tr')
i=1
#desp="今日喜加一"+'\n'
for tr in tr:
        td=tr.find_all('td')
        name=td[1].string.strip().replace('\n', '').replace('\r', '')
        gametype=td[2].string.replace(" ","").replace('\n', '').replace('\r', '')
        start=td[3].string.replace(" ","").replace('\n', '').replace('\r', '')
        end=td[4].string.replace(" ","").replace('\n', '').replace('\r', '')
        time=td[5].string.replace(" ","").replace('\n', '').replace('\r', '')
        oringin=td[6].find('span').string.replace(" ","").replace('\n', '').replace('\r', '')
         
        sp=str(td[6]).split('"')
        http=sp[3]
        desp="序号:"+str(i)+'\n\r'+"游戏名称:"+name+'\n\r'+"类型:"+gametype+'\n\r'+"开始时间:"+start+'\n\r'+"结束时间:"+end+'\n\r'+"是否永久:"+time+'\n\r'+"平台:"+oringin+'\n\r'+"链接:"+http+'\n\r'
 
#推送
send_message_fangtang("今日喜加一",desp)
#print(desp)        

爱喝水的木子...大约 1 分钟serverserverpython
服务器上安装vscode-远程写代码

安装

curl -fOL https://github.com/coder/code-server/releases/download/v4.2.0/code-server_4.2.0_amd64.deb

修改配置

vim ~/.config/code-server/config.yaml
bind-addr:后面的部分改成0.0.0.0:xxxx(xxxx表示端口号,可随意设置)
password:后面的部分改成你想要的密码

爱喝水的木子...小于 1 分钟devcodeserverdev