注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| [General] | |
| loglevel = notify | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29,223.5.5.5,114.114.115.115 | |
| # external-controller-access = [email protected]:6155 | |
| # ipv6 = true | |
| // REMEMBER TO CHANGE THE external-controller-access' PASSWORD |
| [General] | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114 | |
| loglevel = notify | |
| [Proxy] | |
| BJ-All = custom | |
| BJ-HK-Azure = custom | |
| BJ-US-Azure = custom |
| #!/usr/bin/env bash | |
| # Ubuntu Server or VM Cleaner. Safe by default; aggressive when asked. | |
| # Example safe: sudo ./clean.sh | |
| # Example aggressive: sudo JOURNAL_DAYS=3 AGGRESSIVE=1 ./clean.sh | |
| # Enable Docker image prune (images only): sudo ./clean.sh --docker-images | |
| # Tested on Ubuntu 20.04, 22.04, 24.04 (server/VM images). | |
| set -Eeuo pipefail | |
| trap 'rc=$?; echo "Error on line $LINENO: $BASH_COMMAND (exit $rc)"; exit $rc' ERR | |
| IFS=$'\n\t' |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| from __future__ import absolute_import | |
| import signal | |
| import gevent | |
| import gevent.pool | |
| from rq import Worker | |
| from rq.timeouts import BaseDeathPenalty, JobTimeoutException | |
| from rq.worker import StopRequested, green, blue | |
| from rq.exceptions import DequeueTimeout |
| #!/bin/bash | |
| # xcode command tool | |
| xcode-select --install | |
| # check | |
| xcode-select -p | |
| # homebrew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" |
| #!/bin/bash | |
| # Backup an entire LVM logical volume via a snapshot LV and rsync | |
| [[ $( whoami ) != 'root' ]] && echo "sudo please" && exit 1 | |
| set -o errexit | |
| set -o nounset | |
| # LVM logical volume to backup | |
| lv=book01 |
| --- | |
| version: 1 | |
| disable_existing_loggers: False | |
| formatters: | |
| simple: | |
| format: "%(name)-20s%(levelname)-8s%(message)s" | |
| handlers: | |
| console: | |
| class: logging.StreamHandler | |
| level: DEBUG |