As configured in my dotfiles.
start new:
tmux
start new with session name:
| # method 0 | |
| vim body.json # write json | |
| curl -H "Content-Type: application/json" --data @body.json http://localhost:8080/ui/webapp/conf | |
| # method 1 | |
| curl --header "Content-Type: application/json" \ | |
| --request POST \ | |
| --data '{"username":"xyz","password":"xyz"}' \ | |
| http://localhost:3000/api/login |
| ssh-copy-id -p 53 pi@172.20.62.63 # 复制密钥,无密码登录 | |
| scp -P 53 ~/Downloads/ngrok-stable-linux-arm.zip pi@172.20.62.63:/home/pi # scp -P 指定端口 | |
| ssh -p 53 pi@172.20.62.63 # ssh -p 指定端口 |
| import xmlrpclib | |
| import random | |
| import schedule | |
| address="127.0.0.1" | |
| proxy = xmlrpclib.ServerProxy("http://"+ address +":8000/", allow_none = True) | |
| multicall = xmlrpclib.MultiCall(proxy) | |
| def tt(): | |
| value={ |
| import schedule | |
| import time | |
| def job(): | |
| print("I'm working...") | |
| schedule.every(10).minutes.do(job) | |
| schedule.every().hour.do(job) | |
| schedule.every().day.at("10:30").do(job) | |
| schedule.every().monday.do(job) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| grep -nr 'yourString*' . | |
| # The dot at the end searches the current directory. Meaning for each parameter: | |
| #-n Show relative line number in the file | |
| #'yourString*' String for search, followed by a wildcard character | |
| #-r Recursively search subdirectories listed | |
| #. Directory for search (current directory) |
| ps -a # 列出所有运行中/激活进程 | |
| ps -ef |grep python #? | |
| ps -aux # ? | |
| pstree #进程树 | |
| top | |
| htop | |
| sudo nice --3 top # 以优先值-3启动top,优先级值的范围是[-20,19],值越低级别越高,可通过top中的NI(nice value)查看 | |
| renice -n 4 -p 3806 # 改变指定进程的优先值 -n 优先级 ,-p 进程 | |
| renice -3 -u mm # 用户mm所有的进程优先值变为-3 | |
| killall -9 python #杀死所有python进程 |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>vue</title> | |
| <script src="https://unpkg.com/vue"></script> | |
| </head> |
| console.log() |