You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| """Calculate the probability of generating a duplicate random number after | |
| generating "n" random numbers in the range "d". | |
| Usage: python birthday_probability.py n [d=365] | |
| Each value can either be an integer directly, or in the format "2**x", where | |
| x is the number of bits in the value. | |
| For example, to calculate the probability that two people will have the same | |
| birthday in a room with 23 people: |
Comparison of Spring Cloud with Eureka
I feel Consul.io does better in the following area:
The focus on scriptable configuration allows for better container management.
Eureka requires either external Configuration Server or multiple configuration files.
The options for securing communications is more advanced.
Eureka requires creating application with security settings desired. Default will allow HTTP only. Registration of end points assumes http but can be forced to https with code.
| App configuration in environment variables: for and against | |
| For (some of these as per the 12 factor principles) | |
| 1) they are are easy to change between deploys without changing any code | |
| 2) unlike config files, there is little chance of them being checked | |
| into the code repo accidentally | |
| 3) unlike custom config files, or other config mechanisms such as Java |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amendThis will open your $EDITOR and let you change the message. Continue with your usual git push origin master.
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
mkdir ~/bin && cd ~/binwget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/leinchmod 755 leinexport LEIN_JVM_OPTS="-Duser.home=$HOME"lein for self-install| # 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
| # 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
| # Version 2.0 | |
| [General] | |
| # 日志等级: warning, notify, info, verbose (默认值: notify) | |
| loglevel = notify | |
| # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
| # 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
| # 设置中.) |