快捷键

锁定屏幕win+l
打开运行win+r

windows 10

呼出剪切板win+v
语音输入win+h

添加开机自启动项

在运行中输入shell:startup

获取sha1 MD5

Get-FileHash -a SHA1 [yourfilename]
certutil -hashfile [yourfilename] MD5
certutil -hashfile [yourfilename] SHA1
certutil -hashfile [yourfilename] SHA256

chrome设置socks5代理

“chrome.exe” –show-app-list –proxy-server=”SOCKS5://10.10.xxx.xx:30101”

电脑休眠可能导致ipv6消失

ping 计算机名称

使用winbind samba in linux

intel rst 不兼容linux

导致安装linux时无法识别硬盘

计算机使用的缺省编码方式就是计算机的内码
字符必须编码后才能被计算机处理

  • 字母编码ASCII
  • 通用编码UTF-8
  • 汉字编码GB2312到GBK

-电话骚扰识别
-支付宝指纹
-流量提示
-应用自启
-手电筒
-扫一扫
-极简模式
-长按复制
-小米钱包公交卡
-天气
-指南针
-没有google全家桶

激活时间半年
管理员身份运行powershell

1
2
3
4
5
6
7
8
9
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX

slmgr /skms kms.luody.info

slmgr /ato

#查看激活时间
slmgr.vbs -xpr
slmgr.vbs -dlv

下载mpv

链接

mpv配置

1
2
3
4
5
6
7
8
9
#idle=yes #播放完后不退出
volume=100
osd-on-seek=msg #去掉快进时的条栏
osd-font-size=20 #输出信息的字体大小
audio-display=external-first #播放音乐时,优先显示外部封面
hwdec=yes #打开硬件解码

#no-fixed-vo #已去除
#no-osd-bar #已去除

刷入新版的twrp

刷机前退出系统账号

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 测试,只有下次启动使用recovery.img
fastboot boot recovery.img
# 永久刷入recovery.img
fastboot flash recovery recovery.img

adb sideload <ROM zip file>

fastboot oem reboot-recovery
adb reboot bootloader

adb reboot recovery

# 关机
adb shell reboot -p
adb reboot

scene等应用安装

充电限制
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

  • git记录删除动作:rm <file> + git commit -am "abc"git rm <file> + git commit -m "abc"
  • 不再同步相关文件:本地缓存删除(改变成未track状态)git rm -r --cached filename,然后再修改.gitignore文件
  • 使用windows凭据管理器管理密码,git config --global --add credential.helper manager
  • git 强制pushgit push origin master --force

git设置代理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
git config --global http.proxy http://127.0.0.1:1080

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

git config --global --unset http.proxy

git config --global --unset http.proxy
git config --global --get http.proxy

//对于使用git@协议的,可以配置socks5代理
//在~/.ssh/config 文件后面添加几行,没有可以新建一个

//socks5
Host github.com
User git
ProxyCommand connect -S 127.0.0.1:1080 %h %p

//http || https
Host github.com
User git
ProxyCommand connect -H 127.0.0.1:1080 %h %p

linux

1
2
3
Host github.com
User git
ProxyCommand nc -X 5 -x 127.0.0.1:7891 %h %p

-X 5可以省略,因为是默认值

多用户设置

在~/.ssh/config 文件后面添加几行,并重新进入命令行生效

1
2
3
4
5
6
7
Host qwe
HostName github.com
IdentityFile ~/.ssh/id_ed25519

Host adas # 前缀名可以任意设置
HostName github.com
IdentityFile ~/.ssh/id_rsa

remote origin url改为

1
git remote set-url origin git@adas:*/*.git

git@qwe:**/**.git

git@adas:**/**.git

配置ssh密钥到git服务器

cd ~/.sshls查看该目录下是否之前已经生成密钥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:在历史记录中搜索相关命令

linux

  • !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查看某个 Unit 的日志

  • netstat -tunlp | grep 8000查看端口占用

1
2
3
# netstat -tunlp | grep 8000
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 26993/nodejs
# kill -9 26993
  • 查看磁盘剩余空间:df -hl

  • 命令行设置代理

1
2
3
4
5
export http_proxy=http://192.168.1.19:8118/
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
  • grep "" -rw:在文件中搜索

ssh

  • ssh root@ipaddress -p port
  • close stuck SSH sessions: ~.
    ssh客户端设置超时不自动断开连接,每30秒向服务器发送一个空包
    ~/.ssh/config(windows 10中c:\users\<username>\.ssh\config)文件中添加
1
ServerAliveInterval 30

powershell

  • 设置代理$env:all_proxy="socks5://127.0.0.1:1080"
1
2
$env:http_proxy="http://127.0.0.1:8118"
$env:https_proxy="http://127.0.0.1:8118"

来源

0%