日常学习速记[置顶]
常用网站
Name | Link |
---|---|
Iconfont矢量图标库 | https://www.iconfont.cn/ |
*drive直链提取 | https://link.gimhoy.com/ |
图片AI放大 | https://bigjpg.com/ |
MSDN | https://msdn.itellyou.cn/ |
Onedrive资源检索(不稳定) | https://ionego.net/ |
windows安装时手动分区
1 | diskpart |
size的单位是MB
pip清华源
1 | pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U |
python2安装opencv出错
pip install opencv-python==4.2.0.32
参考连接
ssh算法弃用导致错误
ssh连接报错no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
解决方法:需要在/etc/ssh/ssh_config
中添加KexAlgorithms +diffie-hellman-group1-sha1
然后执行sudo ssh-keygen -A
homebrew换源
1 | 作者:王不知 |
报错:fatal: cannot change to '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask': No such file or directory
原因:没有安装homebrew-cask
UbuntuServer更换初始软件源
在Ubuntu Server的初始化中,默认的软件源是http://cn.archive.ubuntu.com/
这个软件源在中国大陆访问会出现无法连接上软件源的情况,需要对其进行更换
将默认的http://cn.archive.ubuntu.com/
修改为http://mirrors.aliyun.com/ubuntu/
可以跑满带宽
VMware桥接网卡
在使用虚拟机的过程中,出现了桥接网络无法获取IP的情况,现记录解决方法
1.在菜单栏中选择Edit→Virtual Network Editor
2.点击Change Settings,使用管理员权限修改
3.在桥接模式的设定中,选择桥接到本机的无线网卡
Ubuntu启用32位
1 | sudo dpkg --add-architecture i386 |
wsl2使用宿主机代理
在.bashrc
或者.zshrc
中添加如下内容
1 | export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*'); |
完成后,输入source .bashrc
或者source .zshrc
开启wsl2或hyperv后Jetbrains的IDE无法启动
PyCharm Pro 2021.3 suddenly cannot start IDE
WSL2, Hyper-V & Reserved Ports
原因:IDE需要绑定的端口6942-6991
被系统占用
netsh int ipv4 show excludedportrange protocol=tcp
可以查看被系统占用的端口
netsh int ipv4 set dynamic tcp start=40000 num=5000
将端口占用的范围修改到40000-45000
reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f
禁止HNS占用
oh-my-zsh配置
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
编辑~/.zshrc
将ZSH_THEME
的值改为ys
或保持默认(个人喜好
隐藏用户名DEFAULT_USER=$USER
安装 syntax-highlighting
& zsh-autosuggestions
1 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && chmod -R 555 ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting && chmod -R 555 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions |
编辑~/.zshrc
plugins=(git z colored-man-pages zsh-autosuggestions zsh-syntax-highlighting extract)
在切换shell后,.bashrc
中的代理设置要复制到.zshrc
中
使zsh配置生效source ~/.zshrc
Chrome修改User-Agent
Chrome插件 User-Agent Switcher and Manager
tar命令
https://www.cnblogs.com/jyaray/archive/2011/04/30/2033362.html
- 压缩
tar –cvf jpg.tar *.jpg
将目录里所有jpg文件打包成tar.jpg
tar –czf jpg.tar.gz *.jpg
将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jpg.tar.gz
tar –cjf jpg.tar.bz2 *.jpg
将目录里所有jpg文件打包成jpg.tar后,并且将其用bzip2压缩,生成一个bzip2压缩过的包,命名为jpg.tar.bz2
tar –cZf jpg.tar.Z *.jpg
将目录里所有jpg文件打包成jpg.tar后,并且将其用compress压缩,生成一个umcompress压缩过的包,命名为jpg.tar.Z
- 解压
tar –xvf file.tar
解压 tar包
tar -xzvf file.tar.gz
解压tar.gz
tar -xjvf file.tar.bz2
解压tar.bz2
tar –xZvf file.tar.Z
解压tar.Z
tshark权限不足
1 | [email protected]:~ $ sudo tshark -i wlan0 -w out.pcap |
解决方法sudo tshark -i wlan0 -w /tmp/out.pcap
Node.js Binary Distributions
https://github.com/nodesource/distributions/blob/master/README.md
Node.js LTS (v16.x):
1 | # Using Ubuntu |
hackthebox连接
https://app.hackthebox.com/home
注意事项
选择vpn连接方式时,选择
tcp/443
为了保证vpn连接的稳定,请在
.ovpn
文件中添加指向宿主机的代理
- 使用openvpn时需要root权限,连接后先用ping检测能否连接题目
chromium开启同步
1 | windows cmd输入 |
配置anbox代理
burpsuite的监听设置为监听全部端口
adb shell settings put global http_proxy 192.168.250.1:8080