参考链接:
虚拟机有 2 台
» virsh list --title --all
Id Name State Title
--------------------------------------------------
5 vm-01 running 192.168.2.110
6 vm-02 running 192.168.2.111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # User and group used by worker processes | |
| user www-data; | |
| # Ideally # of worker processes = # of CPUs or cores | |
| # Set to auto to autodetect | |
| # max_clients = worker_processes * worker_connections | |
| worker_processes auto; | |
| pid /run/nginx.pid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # User ssh configuration file ~/.ssh/config | |
| # Gist https://gist.github.com/terrywang/3997931 | |
| # man ssh_config for more information | |
| # Inspired by the blog post below to fight the NSA | |
| # https://stribika.github.io/2015/01/04/secure-secure-shell.html | |
| # Github needs diffie-hellman-group-exchange-sha1 some of the time but not always | |
| # Host github.com | |
| # KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install libssl-dev | |
| git clone https://github.com/proftpd/proftpd.git | |
| cd proftpd | |
| ./configure --with-modules=mod_digest #开启这个模块可以支持xcrc远程快速比较 | |
| make | |
| sudo make install | |
| sudo vi /usr/local/etc/proftpd.conf | |
| #在"Port 21"下面加上: | |
| SocketBindTight on #因为通过kcptun通道走, 不需要监听外网ip, 只要127.0.0.1即可 | |
| DefaultAddress 127.0.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(gganimate) | |
| NUMPLAYERS = 45 | |
| ROUNDS = 5000 | |
| INITWEALTH = 45 | |
| #initialize the bank | |
| #columns wealths of the NUMPLAYERS players | |
| #rows show wealths of each of the ROUNDS ticks of the clocks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias 'pg_sql_restore'='PGPASSWORD=SOMEPASSWORD psql -cO -U username -d dbname -h localhost -f ' # + set path to backup file | |
| alias 'pg_tar_restore'='PGPASSWORD=SOMEPASSWORD pg_restore -cO -U username -d dbname -h localhost ' # + set path to backup file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mina/bundler' | |
| require 'mina/git' | |
| set :application, "forum" | |
| set :domain, '%SERVERNAME%' | |
| set :deploy_to, "%PATH-TO-APPLICATION%" | |
| set :repository, '%REPOSITORY-URL%.git' | |
| set :branch, 'master' | |
| set :login, "%LOGIN%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mina/bundler' | |
| require 'mina/git' | |
| set :application, "forum" | |
| set :domain, '%SERVERNAME%' | |
| set :deploy_to, "%PATH-TO-APPLICATION%" | |
| set :repository, '%REPOSITORY-URL%.git' | |
| set :branch, 'master' | |
| set :login, "%LOGIN%" |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/