# install at https://multipass.run/
multipass launch --name microk8s-flux --mem 2G
multipass shell microk8s-flux
# assume ubuntu with snap installed, if not install it via
apt install snapd
To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
- Get PAT (personal access token)
Personal Settings > Developer settings > Personal access tokens
This file contains hidden or 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
# code: language=ansible | |
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: true | |
any_errors_fatal: true | |
vars: | |
base_dir: "{{ home_dir }}/git/nerd-fonts" | |
repo_url: https://github.com/ryanoasis/nerd-fonts.git |
This file contains hidden or 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 | |
# run this on the remote terminal machine, as auser with sudo powers, probably through a remote ssh shell | |
# this will overwrite all the settings it touches | |
# the name of the user to run these commands as | |
TARGET_USER=jane | |
# we need an inlocked desktop session. we can either start a new autologin one or unlock an existing one |
This file contains hidden or 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 | |
# To see current swap usage | |
sysctl -a | grep swap | |
# Monitor swap usage | |
vm_stat 60 | |
# Use only when when your system is in a very bad shape | |
sudo pkill -HUP -u _windowserver |
This file contains hidden or 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
; Diablo II LoD | |
; | |
; Instructions: | |
; | |
; 1) Start the game in windowed mode (eg. "-sndbkg -skiptobnet -w" options in shortcut). | |
; | |
; 2) Press Ctrl Alt f , Ctrl Alt h to set game to 1600x1200 centered on the desktop. | |
; | |
; | |
; Ctrl Alt f Toggle active window title bar. |
Ansible has various ways of looking up data from outside sources, including plain text password files, CSV files and INI files. But it doesn't seem to have a lookup for .env files, as used in Laravel projects, also available for PHP, Ruby, Node.js, Python and others.
One option is to launch Ansible with the Ruby dotenv
command line script... But that requires Ruby, which seems like overkill to me.
So here is a simpler solution that I use. It consists of:
- The
.env
file itself - A small shell script that loads the
.env
file into environment variables -ansible-playbook.sh
Multipass can launch and run virtual machines and configure them with cloud-init like a public cloud
brew install multipass libvirt
brew services start libvirt
multipass set local.passphrase=<foo> # `multipass set local.passphrase` avoids stdout creds
multipass authenticate
multipass get local.driver
This file contains hidden or 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 python3 | |
""" | |
NOTE: | |
Extended into a full repo at https://github.com/pythoninthegrass/convert_html_md | |
Any future work will be posted there. | |
SOURCES: | |
https://gist.github.com/aolle/6e595650391deef79ffb1c9bb38fb6e9 | |
https://dev.to/kcdchennai/python-decorator-to-measure-execution-time-54hk |