In order of first appearance in The Morning Paper.
| # Description: Boxstarter Script | |
| # Author: Jess Frazelle <jess@linux.com> | |
| # Last Updated: 2017-09-11 | |
| # | |
| # Install boxstarter: | |
| # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| # | |
| # You might need to set: Set-ExecutionPolicy RemoteSigned | |
| # | |
| # Run this boxstarter by calling the following from an **elevated** command-prompt: |
| #!/usr/bin/python | |
| from subprocess import check_output as run | |
| import glob | |
| # Get nodes | |
| nodes = run(['docker', 'node', 'ls', '-q']).split() | |
| self = run(['docker', 'node', 'inspect', 'self', '--format={{.ID}}']).strip() | |
| nodeinfo = {} |
| pwned-passwd () | |
| { | |
| history -d $((HISTCMD - 1)); | |
| sha=$(printf $1 | sha1sum | cut -d' ' -f1 | tr [:lower:] [:upper:]); | |
| prefix=${sha:0:5}; | |
| suffix=${sha:5}; | |
| count=$(curl -Ss https://api.pwnedpasswords.com/range/$prefix | grep $suffix | cut -d':' -f2); | |
| [ -n "$count" ] && echo $count >&2 && return 1; | |
| return 0; |
| ### Launch Rancher container | |
| $ docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable | |
| # v2 | |
| sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher | |
| ### Start 2 Virtualbox VMs with RancherOS | |
| $ docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/rancher/os/releases/download/v1.3.0/rancheros.iso rancheros1 | |
| $ docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/rancher/os/releases/download/v1.3.0/rancheros.iso rancheros2 |
| # first install Git 2.16+ | |
| # https://git-scm.com/download/win | |
| git --version | |
| # (optional) reset machine settings because per-machine config makes no sense in team projects | |
| # the default (when not set) for core.autocrlf is false (no eol conversions) | |
| git config --unset core.autocrlf | |
| git config --unset core.safecrlf | |
| git config --unset core.eol |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.
(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)
Consider the following three functions
WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277
Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.