注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
import sys | |
import numpy | |
import cv2 | |
def comic(img): | |
# do edge detection on a grayscale image | |
gray = cv2.cvtColor(img, cv2.COLOR_BGRA2GRAY) | |
edges = cv2.blur(gray, (3, 3)) # this blur gets rid of some noise |
#如果没有root的话(gateway没法设, dns也没法设), 则不使用系统的usb tethering而是使用gnirehtet而更简单些: | |
https://github.com/Genymobile/gnirehtet | |
sudo iptables -t nat -A OUTPUT -p udp ! -d 127.0.0.1 --dport=53 -j DNAT --to 192.168.0.25:53 | |
./gnirehtet run | |
(可以设置unbound.conf的verbosity: 3<\n> logfile: unbound.log<\n> log-queries: yes 来观察是否生效, log文件位置可以用lsof -c unbound看到) | |
用来收android的更新包非常快, 打google voice也是这个gnirehtet+iptables可以用, 用手机上的lantern或wireguard应用都不行 | |
#手机usb线连pc并启用tether | |
(manual switch on: settings/network & internet/hotspot & tethering/usb tethering | |
default on: settings/system/developer/networking/select usb configuration/rndis(usb ethernet) |
""" | |
MIT License | |
Copyright (c) [year] [fullname] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Error: | |
$ adb devices | |
List of devices attached | |
52003c2b58b445db no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html] | |
Fix: | |
1> sudo usermod -aG plugdev $LOGNAME (https://developer.android.com/studio/run/device) | |
2> lsusb | |
3> sudo vi /etc/udev/rules.d/51-android.rules |