diff --git a/env/theme.sh b/env/theme.sh index 79a528c..05d65ad 100644 --- a/env/theme.sh +++ b/env/theme.sh @@ -5,9 +5,7 @@ sudo apt-get update sudo apt-get -y install git unity-tweak-tool ultra-flat-icons flatabulous-theme zsh mkdir ~/program +sudo apt install git zsh git clone git://github.com/robbyrussell/oh-my-zsh.git ~/program/.oh-my-zsh bash ~/program/.oh-my-zsh/tools/install.sh - -chsh -s /usr/bin/zsh - diff --git a/env/ubuntu18.04.md b/env/ubuntu18.04.md new file mode 100644 index 0000000..241fdd0 --- /dev/null +++ b/env/ubuntu18.04.md @@ -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 \ No newline at end of file diff --git a/opencv/install.md b/opencv/install.md index d91dd81..9f96dee 100644 --- a/opencv/install.md +++ b/opencv/install.md @@ -8,7 +8,7 @@ ## ubuntu ``` bash -unzip opencv-3.4.0.zip +unzip opencv-3.3.0.zip cd opencv sudo apt install cmake @@ -19,7 +19,7 @@ cd my_build ## cmake 中会下载安装一个大文件,网速会很慢 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 .. sudo make @@ -55,6 +55,8 @@ make # and you will see yourself # compete +# sudo pip install numpy opencv-python + ``` diff --git a/openstack/openstack_conf/controller/interface b/openstack/openstack_conf/controller/interface new file mode 100644 index 0000000..0ea0a3c --- /dev/null +++ b/openstack/openstack_conf/controller/interface @@ -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 \ No newline at end of file diff --git a/python/抓包分析.md b/python/抓包分析.md new file mode 100644 index 0000000..753ec7e --- /dev/null +++ b/python/抓包分析.md @@ -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 +``` \ No newline at end of file diff --git a/raspberry/main.md b/raspberry/main.md index fe68a15..e9ca4f8 100755 --- a/raspberry/main.md +++ b/raspberry/main.md @@ -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进程 ``` + + +## 换源 + +```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 +``` \ No newline at end of file diff --git a/raspberry/router.md b/raspberry/router.md index 969c4cc..1f16af1 100755 --- a/raspberry/router.md +++ b/raspberry/router.md @@ -2,24 +2,18 @@ ## 网络配置 +设置静态ip, 需编辑/etc/dhcpcd.conf 文件, 修改/etc/network/interfaces 无效 + wlan0 连接公网,并将网络共享给有线网和wlan1 ``` bash -auto eth0 -iface eth0 inet static -address 192.168.1.1 -netmask 255.255.255.0 +interface wlan0 #指定接口 +static ip_address=192.168.215.1/24 #IP根据需要更改,/24的意思是子网掩码为 255.255.255.0 +# static router=192.168.215.1 #网关 +# static domain_name_serverrs=223.5.5.5 # DNS - -auto wlan0 -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 +interface wlan0 +static ip_address=192.168.216.1/24 ``` ## 固定wlan名称 @@ -40,7 +34,7 @@ nano /etc/dnsmasq.conf ``` bash 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.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 eap PEAP wpa_cli -iwlan0 set_network 0 identity '"username"' -wpa_cli -iwlan0 set_network 0 password '"password"' \ No newline at end of file +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 +``` \ No newline at end of file