Published directly from my personal knowledge base.
DNS Resolution Everywhere
Publish Parts Of Obsidian To My Personal Site
curl: Modify DNS Resolution
How SELinux screws with scripts when run over VMware Tools
SELinux by default prohibits certain things from working through VMware tools (Ansible connection or plain API).
This can be solved two ways:
- Disabling SELinux: BAD, but easy
- Writing a custom SELinux policy: complicated but more secure
Note: Adding/Changing this policy through a VMware tools connection is thankfully possible
Example policy
This policy is the base for a VMware tools policy and allows entering the rpm context (yum).
module custom-vmtools 1.0;
require {
type rpm_script_t;
type vmtools_unconfined_t;
class process transition;
}
#============= vmtools_unconfined_t ==============
allow vmtools_unconfined_t rpm_script_t:process transition
Replace Line In YAML While Keeping Indentation Using Ansible
Looping Dates macOS
Download Full Website Copy
Sometimes it’s nice to download a best effort version of a website, for example before completely redesigning it.
domain=WEB.SITE
wget $domain --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains $domain
Renovate Bot
My tool of choice for doing dependency maintenance/update type of stuff for both [[infrastructure-as-code]] and [[software-projects]]
Vmware Tools Copy Files
Copy To Guest
$vm = Get-VM -Name TEST
Get-Item "X:\yourfile.txt" | Copy-VMGuestFile -Destination "c:\temp" -VM $vm -LocalToGuest -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"
Copy From Guest
$vm = Get-VM -Name TEST
Copy-VMGuestFile -Source c:\yourfile.txt -Destination c:\temp\ -VM $vm -GuestToLocal -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"
Ansible VMware Connection Plugin & Become
IANA To openSSL Ciphers
Handy table to map IANA IDs of ciphers to their openSSL IDs used in web server configurations,
for example [[nginx]] ssl_ciphers
or proxy_ssl_ciphers
Ansible
Need to automate a VM? you need Ansible!
ArgoCD
Django
My preferred framework for building web apps
GitLab
My preferred git server and CI/CD system, either gitlab.com or self-hosted.
Helm
A good way to pull in external dependencies into Kubernetes For writing my own manifests I prefer to use Kustomize.
Hugo
My static site generator of choice, used to build my blog among other things.
JQ
A incredibly powerful tool for manipulating the heaps of JSON files and responses I interact with daily.
A lot of times I also use ijq
1 instead, which is a interactive version of jq
.
Kubernetes
I have run and am still running loads of Kubernetes clusters, mostly on-premise.