a lot
This commit is contained in:
parent
aa85a9e03e
commit
795ad3e9c8
4
env/theme.sh
vendored
4
env/theme.sh
vendored
@ -5,9 +5,7 @@ sudo apt-get update
|
|||||||
sudo apt-get -y install git unity-tweak-tool ultra-flat-icons flatabulous-theme zsh
|
sudo apt-get -y install git unity-tweak-tool ultra-flat-icons flatabulous-theme zsh
|
||||||
|
|
||||||
mkdir ~/program
|
mkdir ~/program
|
||||||
|
sudo apt install git zsh
|
||||||
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/program/.oh-my-zsh
|
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/program/.oh-my-zsh
|
||||||
|
|
||||||
bash ~/program/.oh-my-zsh/tools/install.sh
|
bash ~/program/.oh-my-zsh/tools/install.sh
|
||||||
|
|
||||||
chsh -s /usr/bin/zsh
|
|
||||||
|
|
||||||
|
|||||||
40
env/ubuntu18.04.md
vendored
Normal file
40
env/ubuntu18.04.md
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# ubuntu 18.04 env
|
||||||
|
|
||||||
|
|
||||||
|
## sogou pinyin
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# details referring to https://blog.csdn.net/lupengCSDN/article/details/80279177
|
||||||
|
sudo apt install fcitx
|
||||||
|
sudo dpkg -i sogou*****.deb
|
||||||
|
|
||||||
|
sudo apt install -f
|
||||||
|
|
||||||
|
sudo dpkg -i sogou***.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
## 双系统造成的windows时间错误
|
||||||
|
|
||||||
|
先在ubuntu下更新一下时间,确保时间无误:
|
||||||
|
|
||||||
|
> sudo apt install ntpdate
|
||||||
|
> sudo ntpdate time.windows.com
|
||||||
|
|
||||||
|
然后将时间更新到硬件上
|
||||||
|
|
||||||
|
> sudo hwclock --localtime --systohc
|
||||||
|
|
||||||
|
|
||||||
|
## ubuntu dock
|
||||||
|
|
||||||
|
> gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## NetSpeed 监控网速
|
||||||
|
|
||||||
|
在Ubuntu software 搜索
|
||||||
|
|
||||||
|
## Coverflow Alt-Tab
|
||||||
|
|
||||||
|
优化 alt tab
|
||||||
@ -8,7 +8,7 @@
|
|||||||
## ubuntu
|
## ubuntu
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
unzip opencv-3.4.0.zip
|
unzip opencv-3.3.0.zip
|
||||||
cd opencv
|
cd opencv
|
||||||
|
|
||||||
sudo apt install cmake
|
sudo apt install cmake
|
||||||
@ -19,7 +19,7 @@ cd my_build
|
|||||||
|
|
||||||
## cmake 中会下载安装一个大文件,网速会很慢
|
## cmake 中会下载安装一个大文件,网速会很慢
|
||||||
cmake -D CMAKE_BUILD_TYPE=Release \
|
cmake -D CMAKE_BUILD_TYPE=Release \
|
||||||
-D OPENCV_EXTRA_MODULES_PATH=/home/lab_01/program/opencv_contrib-3.3.0/modules \
|
-D OPENCV_EXTRA_MODULES_PATH=/home/lab/program/opencv_contrib-3.3.0/modules \
|
||||||
-D CMAKE_INSTALL_PREFIX=/usr/local ..
|
-D CMAKE_INSTALL_PREFIX=/usr/local ..
|
||||||
|
|
||||||
sudo make
|
sudo make
|
||||||
@ -55,6 +55,8 @@ make
|
|||||||
# and you will see yourself
|
# and you will see yourself
|
||||||
# compete
|
# compete
|
||||||
|
|
||||||
|
# sudo pip install numpy opencv-python
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
14
openstack/openstack_conf/controller/interface
Normal file
14
openstack/openstack_conf/controller/interface
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# The loopback network interface
|
||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
|
||||||
|
auto enp0s8
|
||||||
|
iface enp0s8 inet static
|
||||||
|
address 10.0.0.11
|
||||||
|
netmask 255.255.255.0
|
||||||
|
|
||||||
|
auto enp0s9
|
||||||
|
iface enp0s9 inet manual
|
||||||
|
up ip link set dev $IFACE up
|
||||||
|
down ip link set dev $IFACE down
|
||||||
10
python/抓包分析.md
Normal file
10
python/抓包分析.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 抓包分析
|
||||||
|
|
||||||
|
## 安装pypcap
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# insall flex https://github.com/westes/flex
|
||||||
|
git clone https://github.com/westes/flex.git
|
||||||
|
cd flex
|
||||||
|
./autogen.sh
|
||||||
|
```
|
||||||
@ -13,3 +13,23 @@ dd bs=4M if=2017-11-29-raspbian-stretch.img of=/dev/sdX # 写入镜像
|
|||||||
sudo watch -n 5 pkill -USR1 ^dd$ # 查看dd进程
|
sudo watch -n 5 pkill -USR1 ^dd$ # 查看dd进程
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 换源
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo nano /etc/apt/sources.list
|
||||||
|
#注释掉原文件内容,用以下内容取代:
|
||||||
|
|
||||||
|
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
|
||||||
|
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
|
||||||
|
|
||||||
|
#使用管理员权限(经由sudo),编辑/etc/apt/sources.list.d/raspi.list文件。参考命令行为:
|
||||||
|
|
||||||
|
$ sudo nano /etc/apt/sources.list.d/raspi.list
|
||||||
|
|
||||||
|
#注释掉原文件内容,用以下内容取代:
|
||||||
|
|
||||||
|
deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
|
||||||
|
deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
|
||||||
|
```
|
||||||
@ -2,24 +2,18 @@
|
|||||||
|
|
||||||
## 网络配置
|
## 网络配置
|
||||||
|
|
||||||
|
设置静态ip, 需编辑/etc/dhcpcd.conf 文件, 修改/etc/network/interfaces 无效
|
||||||
|
|
||||||
wlan0 连接公网,并将网络共享给有线网和wlan1
|
wlan0 连接公网,并将网络共享给有线网和wlan1
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
auto eth0
|
interface wlan0 #指定接口
|
||||||
iface eth0 inet static
|
static ip_address=192.168.215.1/24 #IP根据需要更改,/24的意思是子网掩码为 255.255.255.0
|
||||||
address 192.168.1.1
|
# static router=192.168.215.1 #网关
|
||||||
netmask 255.255.255.0
|
# static domain_name_serverrs=223.5.5.5 # DNS
|
||||||
|
|
||||||
|
interface wlan0
|
||||||
auto wlan0
|
static ip_address=192.168.216.1/24
|
||||||
iface wlan0 inet dhcp
|
|
||||||
wpa_conf /etc/wpa_supplicant/wpa_supplicant.conf
|
|
||||||
|
|
||||||
|
|
||||||
auto wlan1
|
|
||||||
iface wlan1 inet static
|
|
||||||
address 192.168.2.1
|
|
||||||
netmask 255.255.255.0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 固定wlan名称
|
## 固定wlan名称
|
||||||
@ -40,7 +34,7 @@ nano /etc/dnsmasq.conf
|
|||||||
``` bash
|
``` bash
|
||||||
listen-address = 127.0.0.1, 192.168.1.1, 192.168.2.1
|
listen-address = 127.0.0.1, 192.168.1.1, 192.168.2.1
|
||||||
dhcp-range = 192.168.1.20, 192.168.1.200, 12h
|
dhcp-range = 192.168.1.20, 192.168.1.200, 12h
|
||||||
dhcp-range = 192.168.1.20, 192.168.1.200, 12h
|
dhcp-range = 192.168.2.20, 192.168.2.200, 12h
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -77,4 +71,44 @@ wpa_cli -iwlan0 set_network 0 pairwise TKIP(CCMP)
|
|||||||
wpa_cli -iwlan0 set_network 0 group TKIP(CCMP)
|
wpa_cli -iwlan0 set_network 0 group TKIP(CCMP)
|
||||||
wpa_cli -iwlan0 set_network 0 eap PEAP
|
wpa_cli -iwlan0 set_network 0 eap PEAP
|
||||||
wpa_cli -iwlan0 set_network 0 identity '"username"'
|
wpa_cli -iwlan0 set_network 0 identity '"username"'
|
||||||
wpa_cli -iwlan0 set_network 0 password '"password"'
|
wpa_cli -iwlan0 set_network 0 password '"password"'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## hostapd
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
interface=wlan0
|
||||||
|
# 网卡对应的驱动名
|
||||||
|
driver=nl80211
|
||||||
|
# 无线网络的名称是Pi-wifi
|
||||||
|
ssid=Pi-wifi
|
||||||
|
# 无线路由器工作模式为802.11g(2.4G)
|
||||||
|
hw_mode=g
|
||||||
|
# 无线网卡使用的信道
|
||||||
|
channel=10
|
||||||
|
# 支持 802.11n
|
||||||
|
ieee80211n=1
|
||||||
|
# 采用WPA2配置
|
||||||
|
wpa=2
|
||||||
|
# 无线网络密码是123456789
|
||||||
|
wpa_passphrase=123456789
|
||||||
|
# 认证方式为WPA-PSK
|
||||||
|
wpa_key_mgmt=WPA-PSK
|
||||||
|
# 开启 WMM
|
||||||
|
wmm_enabled=1
|
||||||
|
# 开启 40MHz channels 和 20ns guard interval
|
||||||
|
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
|
||||||
|
# 接受所有 MAC 地址
|
||||||
|
macaddr_acl=0
|
||||||
|
# 使用 WPA 认证
|
||||||
|
auth_algs=1
|
||||||
|
# 需连接者知道ssid
|
||||||
|
ignore_broadcast_ssid=0
|
||||||
|
# 使用 WPA2
|
||||||
|
wpa=2
|
||||||
|
# 使用预先共享的 key
|
||||||
|
wpa_key_mgmt=WPA-PSK
|
||||||
|
# 使用 AES, 而非 TKIP
|
||||||
|
rsn_pairwise=CCMP
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user