注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
#!/usr/bin/env bash | |
# http://papers.ch/speeding-up-your-mac-osx-terminal-input/ | |
#echo "Disable press-and-hold for keys in favor of key repeat" | |
#defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
echo "Set a blazingly fast keyboard repeat rate" | |
defaults write NSGlobalDomain KeyRepeat -int 0.02 |
Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
<VirtualHost *:5000> | |
... | |
OIDCClaimPrefix "OIDC-" | |
OIDCResponseType "code" | |
OIDCScope "openid email profile" | |
OIDCProviderMetadataURL http://<keycloak_host>:8080/auth/realms/master/.well-known/openid-configuration | |
OIDCClientID <client_id> | |
OIDCClientSecret <client_secret> |
# Docker aliases | |
alias di='sudo docker images' | |
alias dps='sudo docker ps -a' | |
# useful Docker functions | |
dock-run() { sudo docker run -i -t --privileged $@ ;} | |
dock-exec() { sudo docker exec -i -t $@ /bin/bash ;} | |
dock-log() { sudo docker logs --tail=all -f $@ ;} | |
dock-port() { sudo docker port $@ ;} | |
dock-vol() { sudo docker inspect --format '{{ .Volumes }}' $@ ;} |
#允许rpc | |
enable-rpc=true | |
#允许所有来源, web界面跨域权限需要 | |
rpc-allow-origin-all=true | |
#允许非外部访问 | |
rpc-listen-all=true | |
#RPC端口, 仅当默认端口被占用时修改 | |
#rpc-listen-port=6800 | |
#最大同时下载数(任务数), 路由建议值: 3 | |
max-concurrent-downloads=5 |
<VirtualHost *:80> | |
ServerName forum.example.com | |
Redirect permanent / https://forum.example.com | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName forum.example.com |
function drips(){ | |
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /' | |
} |
#Source - http://www.haproxy.org/download/1.5/doc/configuration.txt | |
# Section - 9.2. Unix Socket commands | |
#show stat [<iid> <type> <sid>] | |
# Dump statistics in the CSV format. By passing <id>, <type> and <sid>, it is | |
# possible to dump only selected items : | |
# - <iid> is a proxy ID, -1 to dump everything | |
# - <type> selects the type of dumpable objects : 1 for frontends, 2 for | |
# backends, 4 for servers, -1 for everything. These values can be ORed, | |
# for example: |
sudo apt-get install qemu-utils | |
sudo modprobe nbd | |
sudo qemu-nbd --connect=/dev/nbd0 /full/path/to/qcow2/image/file | |
sudo mkdir /mnt/ubuntu | |
sudo mount /dev/nbd0p1 /mnt/ubuntu |