Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / 99-motd.sh
Last active September 22, 2024 00:47 — forked from arvati/alpine_motd_generator.md
Dynamic motd generator for Alpine Linux
#!/bin/sh
. /etc/os-release
PRETTY_NAME=`awk -F= '$1=="PRETTY_NAME" { print $2 ;}' /etc/os-release | tr -d '"'`
VERSION_ID=`awk -F= '$1=="VERSION_ID" { print $2 ;}' /etc/os-release`
UPTIME_DAYS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 / 86400)
UPTIME_HOURS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 / 3600)
UPTIME_MINUTES=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 % 3600 / 60)
cat > /etc/motd << EOF
@pythoninthegrass
pythoninthegrass / macos_terraform.md
Last active March 3, 2026 14:44 — forked from gwarf/MacOSX_terraform.md
Using terraform in macOS to manage KVM-backed VMs.

Using Terraform on macOS to manage KVM-backed VMs

Installing

Terraform

brew install terraform
@pythoninthegrass
pythoninthegrass / Ubuntu_Vagrant_libvirt.md
Created May 12, 2025 16:57 — forked from PaulNeumann/Ubuntu_Vagrant_libvirt.md
How to Install the Vagrant libvirt Provider on Ubuntu 22.04.2 LTS Desktop or Server

How to Install the Vagrant libvirt Provider on Ubuntu 22.04.2 LTS (and above) Desktop or Server

This document describes how to install the Vagrant libvirt provider on Ubuntu 22.04.2 LTS Desktop or Server. Much of the content is based on a blog post by Philippe Vanhaesendonck of Oracle Corp. describing how to set up the Vagrant libvirt provider on Oracle Linux.

All of the commands shown should be run in a terminal window or SSH session.

Before You Start

Verify That Your CPU Supports Hardware Virtualization

@pythoninthegrass
pythoninthegrass / drugwars.cpp
Created May 16, 2025 14:57 — forked from gbowne1/drugwars.cpp
ghmiranda-drug-wars-fix
#include <iostream>
#include <vector>
#include <map>
#include <memory>
enum class Objects {
Acid,
Weed,
Speed,
Cocaine,
@pythoninthegrass
pythoninthegrass / drugwars.txt
Created May 16, 2025 15:02 — forked from mattmanning/drugwars.txt
Drugwars for the TI-82/83/83+ Calculators
Lbl G
ClrHome
Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO."
2000→Z
5000→Y
0→V
100→K
1→B
2→N
0→I