Some notes on how to install and configure lxc/lxd containers.
Read the 'getting started' docs first:
Lots of good examples:
Some notes on how to install and configure lxc/lxd containers.
Read the 'getting started' docs first:
Lots of good examples:
| #!/usr/bin/env bash | |
| DATE_TAG="$(date -u +"%Y")-$(date -u +"%m")" | |
| CSV_PATH="/home/$(whoami)/log/speedtest.$(hostname).${DATE_TAG}.csv" | |
| LOG_PATH="/home/$(whoami)/log/speedtest.$(hostname).${DATE_TAG}.csv.log" | |
| # ensure the path exists | |
| mkdir -p $(dirname "${CSV_PATH}") | |
| # add the header row if the file does not exist |
| #!/usr/bin/env python | |
| import fileinput | |
| import datetime | |
| input_lines = [] | |
| for line in fileinput.input(): | |
| input_lines.append(line) | |
| ping_key,ping_val,ping_unit = input_lines[0].split(" ") | |
| download_key,download_val,download_unit = input_lines[1].split(" ") |
| #!/usr/bin/env bash | |
| LOG_PATH="/home/$(whoami)/log/speedtest.log" | |
| if result=$(/usr/bin/speedtest --simple); then | |
| parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g') | |
| printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}" | |
| else | |
| printf "[$(date)] error\n" >> "${LOG_PATH}" | |
| exit 1 |
automout home and source profile when SSH login:
Helpful info for working with ISO images and USB formatting/partitioning.
| #!/usr/bin/env bash | |
| # Create a static route for a given host/domain over a specific network interface. | |
| # Put this script in /etc/network/if-up.d/host-interface-route so it runs when the interface comes up | |
| # Script was developer for Ubuntu 16.04 LTS running Network Manager (Gnome 3) | |
| # I use this script to prevent my VPN connections from interfering with automatic reverse SSH tunnles | |
| # to my jump box running in the cloud. | |
| # network interface to target |
| [alias] | |
| co = checkout | |
| ci = commit | |
| st = status | |
| br = branch | |
| s = status | |
| ls = branch --sort=committerdate | |
| lsa = branch --list --sort=committerdate --all | |
| lsr = branch --list --sort=committerdate --remotes | |
| f = fetch |
Checkout github pull requests locally:
Local analytics for git repos: