zsh推荐主题:sorin
mac下获取文件路径:快捷键为: option + command + C
Vscode多光标同时操作/修改:官方文档
Ubuntu修改登录密码
sudo passwd <要修改的用户的名>
Mac Mojave下暗色主题,针对不同App不同设置
To exclude an app from dark mode in macOS Mojave, we first need to know the app’s Bundle Identifier. To find it, open Terminal and enter the following command. Note that “App Name” is the exact name of the application minus its extension. In our Notes app example, our App Name is simply “Notes”:
osascript -e 'id of app "App Name"'
The command above will display the app’s bundle identifier on the next line. In our Notes app example, the result is com.apple.Notes. Now, use that identifier in the following command. Continuing our example, we’d use defaults write com.apple.Notes NSRequiresAquaSystemAppearance -bool yes.
defaults write Bundle Identifier NSRequiresAquaSystemAppearance -bool yes
临时使用,可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple
例如
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent
这样就会从清华这边的镜像去安装gevent库。
永久修改,一劳永逸
linux下,修改 gedit ~/.pip/pip.conf
(没有就创建一个), 修改 index-url至tuna,内容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
ubuntu显示隐藏文件:进入自己主目录,按ctrl+h.就能看见以点号开头的隐藏文件
连接自己的虚拟机
ssh apple@10.211.55.9
password: nvidia
rostopic bw display bandwidth used by topic
rostopic echo print messages to screen
rostopic hz display publishing rate of topic
rostopic list print information about active topics
rostopic pub publish data to topic
rostopic type print topic type
dronekit-sitl rover --home=36.3593011,120.6840625,15,0
mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551
vehicle = connect('127.0.0.1:14551', wait_ready=True)
更新子模块
git submodule update --init --recursive
echo ‘export PATH=/usr/local/Cellar/gcc/8.3.0/bin:$PATH’ >> ~/.bash_profile
cp /usr/local/Cellar/gcc/8.3.0/bin/gcc-8 /usr/local/Cellar/gcc/8.3.0/bin/gcc
cp /usr/local/Cellar/gcc/8.3.0/bin/g+±8 /usr/local/Cellar/gcc/8.3.0/bin/g++
source ~/.bash_profile
Conda常用
conda list:查看安装了哪些包。
conda install package_name(包名):安装包
conda env list 或 conda info -e:查看当前存在哪些虚拟环境
conda update conda:检查更新当前conda
同时安装必要的包
conda create -n env_name python=2.7
conda create -n env_name numpy matplotlib python=2.7
conda activate your_env_name(虚拟环境名称)
conda deactivate
使用命令
conda remove -n your_env_name(虚拟环境名称) --all
即可删除。
安装微信小助手
cd ~/Downloads && rm -rf WeChatPlugin-MacOS && git clone https://github.com/TKkk-iOSer/WeChatPlugin-MacOS.git --depth=1 && ./WeChatPlugin-MacOS/Other/Install.sh