| #cloud-config | |
| # Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease). | |
| hostname: myhost | |
| # Authorize SSH keys for the `rancher` sudoer user | |
| ssh_authorized_keys: | |
| - ssh-rsa AAA...ZZZ example1@rancher | |
Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network
| [Proxy] | |
| TestTLS = https, 192.168.20.6, 443, client-cert=item | |
| [Keystore] | |
| item = password=123456, base64=MIILqQIBAzCCC28GCSqGSIb3DQEHAaCCC2AEggtcMIILWDCCBg8GCSqGSIb3DQEHBqCCBgAwggX8AgEAMIIF9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIh4LPGCPkcqkCAggAgIIFyDOP/a/YB66H0jctVC5/D3ZF98es9Xtf60hqDokaekMp7VlKhr7EEvf1GrmxOY9XqO1dSR0F2C17yefazR7lZVDwfmNvU8eEpIPrBAnqSnCFyMZGXjcu9aoEySkwRlSclqg9lbFhp9XZG4F4qRuo94mlTPDy47dvdzyiPAQPBIq2DOE/qbRVHqrbnZMkUZi1lxihRRcQv7YJAfLEP2VHffjZTYzlBMi/ldKyD4ZQdpM7mdBtHXFa21ZV9j4oqM2PWWToHwIxkeiS6J2SgfEg501QEy4kbihlp+pSK4OMrj33DrVFP9rOMDnkJtQ+EP0LXXQBaF+7rRp+dekcH+sYBQF0cDMhNEkHEBL8LoQ96hZxIDxE3YQ6fq9KGi4TV8Ktkgb2l0G5DoavN8dhCKS5Gx0nexDT8vj91Js94Xt4tFThSyoc4ZmZvN+b2ugqVvYsnWaKqS8UeAjIAFsZCiLgj4OG6frrAxI+V3c8kL9FrwfFQcL9eWoqVfhBv8SKzMYObTv9FwyJn/fyGdtoT19OpyWiP1+nU+WY7e5KjcJNsKeYolgpgHDXdOSYCakQfesENeeKqvzMA6Quj7g7gZl/AB/GjRybyAXfkxyYBLk5cz7MuDcM1nk6DR47IuHBHyrwOATXyejWYrlK0QUVUsFEmM2vjl38jU8+qxjVWDTFu3gQkFBERncJp1XnKSTueDEPkdeq1BzV1SZ1m1KHNPNI4h2lPa+IKvpYbnDure9n1VV7fk2ySJrBFT5pYonXdpyaCTAvTEFk |
| Generating random data (100.00MB) | |
| Start benchmark rc4-md5 | |
| Encrypt data in 0.224s | |
| Decrypt data in 0.222s | |
| Start benchmark aes-128-cfb | |
| Encrypt data in 0.599s | |
| Decrypt data in 0.597s | |
| Start benchmark aes-256-cfb |
This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.
Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).
So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a
| #!/bin/bash | |
| # This is a companion script to https://github.com/konstantin-kelemen/arduino-amiibo-tools | |
| # The original post this was crafted for was https://games.kel.mn/en/create-amiibo-clones-with-arduino/ | |
| # For more info go to https://games.kel.mn/en/companion-script-to-simplify-amiibo-cloning-with-arduino/ | |
| #requirements: | |
| #sha1sum (part of coreutils) | |
| #xxd (part of vim) | |
| #hexdump | |
| #amiitool (https://github.com/socram8888/amiitool) |
This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.
Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.
Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifyi
| { | |
| // 继承,可以继承多个 | |
| // 如安装了 eslint-config-airbnb | |
| // 就可以在 extends 这里引用 airbnb/base, 这样就相当于预设了 airbnb/base 的规则 | |
| // 常用的预设:"eslint:recommended" "airbnb/base" "stanard"(需先安装 eslint-config-standard) | |
| // 当然,除了 eslint-config-xxx 提供了一系列预设,插件(eslint-plugin-xxx)也能提供预设用于继承 | |
| // 例如,当你安装了 eslint-plugin-react 时,就可以在 extends 这里指定 "plugin:react/recommended" | |
| // 当然,也可以指定一个具体的 eslint 配置文件 path/to/file 继承 | |
| "extends": [ | |
| "airbnb/base" |
| #!/bin/bash | |
| # copy is a misnomer; it's actually LIST + INSTALL | |
| # --from 2.2.1 [--to other-version-else-whatever-is-currently-set] | |
| # | |
| # TODO: install only most-recent version that's installed in FROM | |
| # TODO: use gem names only from FROM, install latest available version (might be more recent than in FROM) | |
| # TODO: pass arguments to gem command (e.g. --no-document) | |
| CURRENT_VERSION=`rbenv version | cut -d' ' -f1` | |
| GEM_LIST_ARGS="--local" |