Instrucitons from: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
This file contains 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
--- | |
- name: Set the host grouping | |
set_fact: | |
host_grouping: "{% if inventory_hostname != groups['k8s_master'][0] %}master{% else %}worker{% endif %}" | |
- name: set cluster API address. | |
set_fact: | |
# cluster_api_address: "{{ hostvars[groups['k8s_master'][0]].ansible_default_ipv4.address }}" | |
cluster_api_address: "{{ hostvars[groups['k8s_master'][0]]['secondary_ip'] if ('secondary_ip' in hostvars[groups['k8s_master'][0]]) else hostvars[groups['k8s_master'][0]]['ansible_default_ipv4']['address'] }}" |
This file contains 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
#!/bin/sh | |
# environment fix for vscode-python problems https://github.com/Microsoft/vscode-python/issues/944 | |
# stick this in ${workspaceFolder}/venv/bin/python.sh and adjust settings.json: | |
# "python.pythonPath": "${workspaceFolder}/venv/bin/python.sh", | |
# "python.envFile": "${workspaceFolder}/dev.env", | |
# "python.terminal.activateEnvironment": true, | |
# "python.venvPath": "${workspaceFolder}/venv" | |
# ... | |
echo "Current path is " `pwd` |
This file contains 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
#!/bin/sh -x | |
# test using your own http_proxy value at build time | |
# there is a default ARG for http_proxy already available | |
IMG=test | |
docker rm -f ${IMG} | |
cat <<EOF | docker build --build-arg HTTP_PROXY=http://piers-work:3128 -t ${IMG} - |
This file contains 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
#!/usr/bin/env bash | |
docker run --rm --net=host -e HOME=${HOME} -v /etc/passwd:/etc/passwd:ro --user=$(id -u) -v /snap:/snap -v ${HOME}:${HOME} -w ${HOME} -i python:3.6 python $* |
This file contains 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
#!/bin/bash | |
# This script creates a docker config.json file with the auth section | |
# as an example of what can be passed into GitLab-CI and used in | |
# conjunction with DOCKER_CONFIG - the config file directory location. | |
# command line parameter default values | |
DOCKER_REGISTRY="" | |
DOCKER_USER="" | |
DOCKER_PASSWORD="" |
This file contains 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
# fix completely broken signature validation for apt whe you get message like: | |
# W: GPG error: http://archive.canonical.com/ubuntu xenial InRelease: At least one invalid signature was encountered. | |
# W: The repository 'http://archive.canonical.com/ubuntu xenial InRelease' is not signed. | |
# N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. | |
# N: See apt-secure(8) manpage for repository creation and user configuration details. | |
# ... | |
# and running: | |
apt-key update |
This file contains 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
# use bigvis to bin, condense, smooth and present data | |
library('bigvis') | |
library('ggplot2') | |
# subset the diamonds data | |
mydiamonds <- subset(diamonds, carat < 2.75) | |
# condense avg price based on bins of carat sizes of .1 carat intervals | |
myd <- condense(bin(mydiamonds$carat, .1), z=mydiamonds$price, summary="mean") | |
# smooth out the trend |