Manual

常用的东西 每次都要 google 好麻烦 记个笔记

设置代理

export http_proxy=http://127.0.0.1:8118;export https_proxy=http://127.0.0.1:8118;

linux

查看出口 IP

curl ifconfig.me

查看文件数量

ll | grep '^-' | wc -l

ssh

ssh-copy-id -i ~/.ssh/id_rsa.pub -p 20002 root@116.62.57.97

ssh 使用代理登录

ssh -o ProxyCommand="nc -X 5 -x 127.0.0.1:1086 %h %p" root@207.246.99.183

zsh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Ctrl+p: 上一个使用的历史命令。 (p:previous)
Ctrl+n: 下一个使用的历史命令。(n:next )
Ctrl+t: 交换光标所在字符和其前的字符。
Ctrl+s: 使终端发呆,静止,可以使快速输出的终端屏幕停下来。
Ctrl+q:退出 Ctrl+s 引起的发呆
Ctrl+z:使正在运行在终端的任务,运行于后台。 (可用 fg 恢复)
Ctrl+a:光标回到命令行首。 (a:ahead)
Ctrl+e:光标回到命令行尾。 (e:end)
Ctrl+b:光标向行首移动一个字符。 (b:backwards)
Ctrl+f:光标向行尾移动一个字符。 (f:forwards)
Ctrl+w: 删除光标处到行首的字符。
Ctrl+k:删除光标处到行尾的字符
Ctrl+u:删除整个命令行文本字符
Ctrl+h:向行首删除一个字符
Ctrl+d:向行尾删除一个字符

一键安装

wget https://raw.githubusercontent.com/kong5664546498/half_a_wheel/master/wheel/onekey-omzsh/onekey-omzsh.sh&& chmod +x onekey-omzsh.sh && ./onekey-omzsh.sh

SSR

bbr

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh

ssr

wget https://raw.githubusercontent.com/kong5664546498/half_a_wheel/master/wheel/ss/onekey-ss.sh && chmod +x onekey-ss.sh && ./onekey-ss.sh

连接

ssr://YndnLmFmcmV0by50b3AxOjQ0MzphdXRoX2FlczEyOF9tZDU6YWVzLTI1Ni1jZmI6dGxzMS4yX3RpY2tldF9hdXRoOmNYQjZiVEkzTkRVLz9vYmZzcGFyYW09U0VzeVUwTklNVE13TURnell6RTROVGt6TG5kdWN5NTNhVzVrYjNkekxtTnZiUSZwcm90b3BhcmFtPSZyZW1hcmtzPWJtVjNYMkozWncmZ3JvdXA9

Pikachu

wget https://raw.githubusercontent.com/kong5664546498/half_a_wheel/master/wheel/Pikachu

ssh

1
2
3
ssh-copy-id -i ~/.ssh/id_rsa.pub root@ip
ssh -i ~/.ssh/id_rsa root@47.93.41.80
ssh-keygen -t rsa -C "kongandmarx@163.com"

JB 模板

1
2
3
4
5
6
7
8
9
10
11
'''
-------------------------------------------------
Author : Afreto
E-mail : kongandmarx@163.com
time : ${DATE} ${TIME}
-------------------------------------------------
Description:
Usage:
-------------------------------------------------
'''

1
2
3
4
5
6
7
8
/*
@Time : ${DATE} ${TIME}
@Author : Afreto
@File : ${NAME}
@E-mail : kongandmarx@163.com
*/
package ${GO_PACKAGE_NAME}

windows

电源管理中没有休眠选项

1
2
3
powercfg -h off
powercfg hibernate size 40
Powercfg -h on

windows community solution

powershell 代理设置

$Env:http_proxy="http://127.0.0.1:1087";$Env:https_proxy="http://127.0.0.1:1087"

scoop

iwr -useb get.scoop.sh | iex

Note: if you get an error you might need to change the execution policy (i.e. enable Powershell) with

1
Set-ExecutionPolicy RemoteSigned -scope CurrentUser

关闭 aria2

1
scoop config aria2-enabled false  

日常更新软件命令

1
sudo scoop update * -g ; scoop update * ; sudo scoop cleanup * -g ; scoop cleanup *

查看 Scoop 还能直接识别哪些 bucket

1
scoop bucket known

设置代理

1
scoop config proxy 127.0.0.1:8118

添加常用的 bucket

1
2
3
4
5
6
7
8
9
10
scoop bucket add extras;
scoop bucket add Java;
scoop bucket add versions;
scoop bucket add Ash258 'https://github.com/Ash258/Scoop-Ash258.git'
scoop bucket add dorado https://github.com/h404bi/dorado
scoop bucket add iszy https://github.com/ZvonimirSun/scoop-iszy
scoop bucket add dodorz https://github.com/dodorz/scoop-bucket
scoop bucket add rasa https://github.com/rasa/scoops
scoop bucket add scoopet https://github.com/integzz/scoopet
scoop bucket add raresoft https://github.com/L-Trump/scoop-raresoft

WSA

系统设置

浏览器打开 wsa://com.android.settings