android刷机
刷入新版的twrp
刷机前退出系统账号
1 | # 测试,只有下次启动使用recovery.img |
scene等应用安装
充电限制
termux
magisk
rvnc
scene
v2rayNG
1 | # 测试,只有下次启动使用recovery.img |
充电限制
termux
magisk
rvnc
scene
v2rayNG
两台电脑使用网线互连后,使用注意:
主电脑(带互联网连接,使用双网卡)可以使用适配器属性中的Internet共享将互联网共享给另一台电脑(次电脑)。
次电脑不能再使用共享Internet因为需要共享的网卡的ip会被windows默认设置为192.168.137.1所以造成局域网存在使用了相同ip的不同网卡,产生冲突。
设置所有网址都走连接外网的网卡(192.168.123.1)
1 | route add –p 0.0.0.0 mask 0.0.0.0 192.168.123.1 |
设置走内网(内网的网关192.168.102.1)
1 | route add –p 10.128.0.0 mask 255.255.0.0 192.168.102.1 |
rm <file> + git commit -am "abc" 和git rm <file> + git commit -m "abc"git rm -r --cached filename,然后再修改.gitignore文件git config --global --add credential.helper managergit push origin master --force安装TortoiseGit后,在TortoiseGit中的settings=>network中设置代理
没有安装TortoiseGit,则在Git Bash中设置:
1 | git config --global http.proxy http://127.0.0.1:1080 |
1 | Host github.com |
-X 5可以省略,因为是默认值
在~/.ssh/config 文件后面添加几行,并重新进入命令行生效
1 | Host qwe |
remote origin url改为
1 | git remote set-url origin git@adas:*/*.git |
git@qwe:**/**.git
和git@adas:**/**.git
cd ~/.ssh再ls查看该目录下是否之前已经生成密钥id_dsa.pub公钥文件和id_dsa私钥文件,文件名可能id_dsa可能是别的名字,但都是成对出现,其中公钥以.pub结尾。
如果没有就可以ssh-keygen来创建密钥对。该程序在 Linux/Mac 系统上由 SSH 包提供。中途需要一些额外的配置,记住输入的密码即可,其他的配置可以按enter使用默认的方式。
生成之后复制公钥id_dsa.pub的内容,在git服务器上添加SSH keys的位置添加即可。ps:cat id_dsa.pub打印公钥id_sda.pub的内容。
git remote set-url <name> <newurl>name默认为origin,这样就可以将已有的https远程仓库地址修改为newurl——ssh的新地址了。
CTRL+R:在历史记录中搜索相关命令
!command:调用最近使用的command命令
!!:调用上一条命令
CTRL+U:清除光标前的输入
CTRL+K:清除光标后的输入
在浏览器中查看命令说明:man -H <name>
fcitx剪切板ctrl + ;
查看文件占用:du df
vim register。"+:寄存器对应于X中的CLIPBOARD缓冲区,"*:寄存器发送到X中的PRIMARY缓冲区
vimy复制,p粘贴
终端中输入export 环境变量会在退出前生效
less 跳转到最后一行G
journalctl -u nginx.service查看某个systemd的Unit 的日志
netstat -tunlp | grep 8000查看端口占用
1 | # netstat -tunlp | grep 8000 |
df -hl设置本次命令行生效:
1 | export http_proxy=http://192.168.1.19:8118/ |
或者保存在文件中
修改/etc/environment。添加代理:
1 | http_proxy="http://localhost:10809" |
grep "" -rw:在文件中搜索ipaddress -p port~.~/.ssh/config(windows 10中c:\users\<username>\.ssh\config)文件中添加1 | ServerAliveInterval 30 |
$env:all_proxy="socks5://127.0.0.1:1080"1 | $env:http_proxy="http://127.0.0.1:8118" |
npm install <package>安装并保存在package.json中。
npm install <package> -gnpm uninstall <package>卸载并从package.json中删除
Node 的官方模块仓库网速太慢,模块仓库需要切换到阿里的源。
1 | npm config set registry https://registry.npmmirror.com |
执行下面的命令,确认是否切换成功。
1 | npm config get registry |
使用官方镜像
1 | npm config set registry https://registry.npmjs.org/ |
淘宝npm源地址变化:https://registry.npm.taobao.org到https://registry.npmmirror.com
~的意思是匹配小版本 比如~1.2.3将会匹配所有的1.2.x版本,但不匹配1.3.0。^的意思是匹配大版本 比如^1.2.3 将会匹配 所有1.x.x包括1.3.0但不包括2.0。
hexo升级运行npm outdated后修改package.json内的版本再升级npm update
scrcpy -Sw -b 20M
返回: 鼠标右键
全屏: alt+f
旋转设备: alt+r
旋转窗口: alt+left
控制台输出fps: alt+i
关闭屏幕:alt+o
打开屏幕:alt+shift+o
参考 scrcpy
1 | adb connect 127.0.0.1:58526 |
将元素高宽设置为0,然后设置三个方向的border,每个border不是正方形,而是三角形。查看这三个border的形状
.triangle {
width: 0;
height: 0;
border-width: 0 40px 40px;
border-style: solid;
border-color: black red green yellow;
}

所以不设置上方向的border,左右border设置为透明,下border设置为需要的颜色即可绘制方向朝上的三角形。要绘制其他方向的箭头同理。
给上面这个三角形元素添加::after伪元素,按照上面的方法设置同样的三角形。但是伪元素位置是相对于父元素的contentbox的,所以要添加absolute定位调整伪元素的位置。
div{
width: 0;
height: 0;
/* top | left and right | bottom */
border-width: 0 100px 100px;
border-style: solid;
border-color: black transparent green transparent;
position: relative;
}
div::after{
content: '';
border-width: 0 100px 100px;
border-style: solid;
border-color: black transparent white transparent;
position: absolute;
top: 2px;
left: -100px;
}
左右方向带border的三角形就可以作为对话框上的箭头了
<div class="flex">
<div class="triangle"></div>
<section>hello</section>
</div>
<style>
.flex{
display: flex;
align-items: center;
}
.triangle{
width: 0;
height: 0;
border-width: 5px 5px 5px 0;
border-style: solid;
border-color: transparent green transparent black ;
position: relative;
}
.triangle::after{
content: '';
border-width: 5px 5px 5px 0;
border-style: solid;
border-color: transparent white transparent black ;
position: absolute;
top: -5px;
left: 2px;
}
section{
height: 20px;
width: 500px;
border: 1px green solid;
}
</style>

一键安装脚本 curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_mult.sh && chmod +x trojan_mult.sh && ./trojan_mult.sh
1 | chrome.exe --show-app-list --proxy-server="SOCKS5://<address>:<port>" |
1 | mkdir /etc/trojan/ssl |
客户端中remote_addr为远程的ip地址。
不论主要内容section高度有多高,底栏footer始终保持在最下方
<style>
header {
height:100px;
background-color: green;
}
section {
height: 500px; // 可以任意改变
background-color: red;
}
footer {
height: 100px;
position: -webkit-sticky;
position: sticky;
bottom: 0;
background-color: green;
}
</style>
<body>
<header>HEADER</header>
<section>MAIN</section >
<footer>FOOTER</footer>
</body>