-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaily_learning_note
More file actions
140 lines (115 loc) · 8.88 KB
/
daily_learning_note
File metadata and controls
140 lines (115 loc) · 8.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
20161212 描述:在使用sudo apt-get install **包时,出现了“无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系”的问题
解决办法:修改源设置,勾选“推荐更新”选项和其他的一些选项,然后sudo apt-get update,再进行安装即可解决
20161214 git使用笔记:
添加git账号: git config --global user.email "doctorsrn@gmail.com"
git config --global user.name "doctorsrn"
首先在github上创建远程仓库Repository,复制该Repository的SSH地址,然后在本地建立本地仓库:git init,将当前文件夹下所有文件添加至本地仓库:
git add -A ., 再建立本地仓库和远程仓库的连接git remote add origin ssh_address.git。完成后就可以进行本地仓库和远程仓库之间的pull和push操作了。
push操作(三步): git add changed_file //添加已经更改的文件,即要提交的文件
git commit -m "first commit*****" //填写commit
git push origin master //将本地(origin)仓库push到远程仓库的master分支
pull操作(一步): git pull origin master //将远程仓库的master分支pull到本地(origin)仓库
此外将github上的某个仓库clone至本地:git clone ssh_address.git
20170111 picocom -b 115200 /dev/ttyUSB0 或者使用cutecom
20170112 问题一:ROS出现的bug,launch之后出现错误可以尝试删除log目录:rm -r ~/.ros/log 然后在尝试
问题二:修改了.h文件的内容,如果不make clean而直接make burn的话修改的内容不会生效,因为.h文件不会重新产生bin文件,只有.c文件被修改之后
才会在make burn时重新生成bin文件。
20170113 在使用rviz进行仿真时,如果出现Fixed Frame [map] does not exist的错误,多次重启rviz能解决该问题。
20170115 tmuxs使用:创建一个竖直放置的窗格很容易,按下 Ctrl-b %
创建一个水平的窗格,按下 Ctrl-b “
git使用:再添加新的文件夹时,如果该文件夹或其子目录下存在.git文件则无法git push到远程仓,解决步骤:
1.删除.git .gitignore文件
2.git rm --cached directory
git add directory 注:directory为子文件夹的路径
3.重新git commit 然后在git push即可
此外,git对于空文件夹不会push到远程仓,可以在空文件夹随便放一个文件,例如touch .keep 或者 touch .gitignore即可上传
另外,对于不想上传的文件可以使用.gitignore进行忽略:首先在.git所在的文件夹下创建.gitignore文件:touch .gitignore
然后打开:vim .gitignore 将不想上传的文件和文件夹写入,例如:CMakeLists.txt
rbx1/
build-beginner_tutorials-Desktop-Default/
即可忽略上述文件和文件夹。
20170214 同步开发板的时间为网络时间: sudo ntpdate cn.pool.ntp.org
20170218 在Tab自动补全时出现Warning: error while crawling /home/siat: boost::filesystem::status: Permission denied: "/home/siat/.gvfs"的解决办法:
sudo umount ~/.gvfs 或 sudo umount /home/congleetea/.gvfs
rm -rf .gvfs/
20170301 设置arm-gcc和openocd为全局工具链:1.安装openocd:打开openocd目录,使用sudo make install命令安装;
2.添加arm-gcc到全局环境变量,export PATH=$PATH:/home/srn/openre_armtest/5_Development_Toolchain/gcc-arm-none-eabi-5_4-2016q2/bin/
完成后就可以在其他目录编译openre工程
20170303 安装系统监视器,sudo apt-get indicator-multiload
修改Ubuntu开机启动画面,将图片文件移动至/boot/grub目录,然后使用sudo update-grup将自动识别并添加。
20170308 在Ubuntu下设置ShadowSocks为全局代理的方法:http://blog.csdn.net/hanshileiai/article/details/52624303
sudo pip install genpac
pip install --upgrade genpac
mkdir vpnPAC
cd vpnPAC
touch user-rules.txt
genpac -p "SOCKS5 127.0.0.1:1080" --gfwlist-proxy="SOCKS5 127.0.0.1:1080" --output="autoproxy.pac" --gfwlist-url="https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt" --user-rule-from="user-rules.txt"
设置全局代理
点击:System settings > Network > Network Proxy ;
选择 Method 为 Automatic
设置 Configuration URL 为 autoproxy.pac 文件的路径
点击 Apply System Wide。
格式如:file:///home/{user}/vpnPAC/autoproxy.pac
20170309 fcitx占用率高的解决办法:使用htop杀死fcitx进程,然后使用:fcitx & 重启该服务
20170313 如何打开.appimage文件:
首先 chmod a+x **.appimage
然后 ./**.appimage 即可
20170315 最近用各种脚本下载东西的时候发现有的站点需要当地IP才能下,比如.....nico, youtube等;所以就找了下能在终端用socks5代理的工具,最后找到了proxychains,从此再无压力=w=
proxychains安装
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
./configure
make && make install
cp ./src/proxychains.conf /etc/proxychians.conf
cd .. && rm -rf proxychains-ng
编辑proxychains配置:
vim /etc/proxychains.conf
将socks4 127.0.0.1 9095改为
socks5 127.0.0.1 1080 //1080改为你自己的端口
使用方法:
在需要代理的命令前加上 proxychains4 ,如:
proxychains4 wget http://xxx.com/xxx.zip
20170319 使用github clone时,为了获得较大的传输速度,使用https格式的链接,并且可以使用http格式,这样速度更快。另外可以使用proxychains4工具加速。
20170328 搜狗拼音无法输入中文的解决办法:删除搜狗拼音输入法的配置文件,并重启输入法。执行如下指令:
cd ~/.config
find . -name sogou*
find . -name Sogou*
将两次搜索到的配置文件删除即可。
rm -r SogouPY
rm -r SogouPY.users/
rm -r ./sogou-qimpanel/
20170911 tensorflow install:
1. install pip3: sudo apt-get install python3-pip
use to 'sudo apt-get install aptitude' & 'sudo apt-get install python3-pip' to solve dependents problem
2. install tensorflow: sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp34-cp34m-linux_x86_64.whl
TODO: cannot install tensorflow by using: sudo pip/pip3 install tensorflow
20171008: spacemacs install ipython notebook
1.use MELPA to install package:http://ergoemacs.org/emacs/emacs_package_system.html
2. ipython notebook package name in emacs is "ein"
3.keybinding reference: https://millejoh.github.io/emacs-ipython-notebook/#ein:console-args
Note: jupyter notebook must work with passwd mode. Reference web:http://www.jianshu.com/p/c5cc672aae63
20180125: github+hexo-->myblog:https://www.jianshu.com/p/a3ab83dba041
https://zhuanlan.zhihu.com/p/26625249
multi-pc hexo:http://blog.csdn.net/Monkey_LZL/article/details/60870891
20180628: ubuntu txt file encodeing mistake: https://www.jb51.net/article/138697.htm
detective file encoding: chardet3 filename
use gedit to open file: gedit --encoding ENCODING_TYPE
ROS python2 cv2:https://stackoverflow.com/questions/48039563/import-error-ros-python3-opencv
20180630: make spacemacs to support Chinese input method:
1.change .spacemacs config file, add chinese layer
2. use " env LC_CTYPE=zh_CN.UTF-8 emacs" to start spacemacs
reference: https://www.jianshu.com/p/7a5eab90013b
https://www.jianshu.com/p/354896569a90
20181025:
20190110:# Ubuntu 16.04 升级python3.5到python3.6版本
由于python3.5下安装了很多东西,不想卸载python3.5,所以需要使python3.5和python3.6共存。
1)安装python3.6,使用update-alternatives进行共存版本管理:参考https://blog.csdn.net/chaiyu2002/article/details/82698376
2)经过步骤1后会出现pip3无法使用的问题和ctrl+alt+t无法打开终端的问题,解决办法强制重新安装pip3:https://stackoverflow.com/questions/49940813/pip-no-module-named-internal
对应的命令:
```
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py --force-reinstall
```
第一条命令可能会执行失败,要多次尝试运行。
另外的参考网站:https://www.cnblogs.com/code-wangjun/p/9981634.html
20190309: pychcarm 使用时无法导入自己py文件中的函数,解决办法:https://blog.csdn.net/qq_30622831/article/details/80978118