注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| global | |
| daemon | |
| defaults | |
| mode http | |
| log global | |
| option httplog | |
| option http-server-close | |
| option dontlognull | |
| option redispatch |
| Run the following: | |
| iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT | |
| iptables -A FORWARD -m pkttype --pkt-type multicast -j ACCEPT | |
| iptables -A OUTPUT -m pkttype --pkt-type multicast -j ACCEPT | |
| Or: | |
| iptables -A INPUT -s 224.0.0.0/4 -j ACCEPT | |
| iptables -A FORWARD -s 224.0.0.0/4 -d 224.0.0.0/4 -j ACCEPT |
| [** | |
| * | |
| * -=( Python Code Generator )=- | |
| * | |
| * This script will generate one file per packages. | |
| * It also support following things: | |
| * - classes/interfaces (as classes)/enumerations | |
| * - inheritance/interface realization (as inheritance) | |
| * - attributes/associations | |
| * + cardinility {x...*} -> generated as list |
| #!/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 |