Skip to content

Instantly share code, notes, and snippets.

View ecnepsnai's full-sized avatar
🏳️‍🌈

Ian Spence ecnepsnai

🏳️‍🌈
View GitHub Profile
@ecnepsnai
ecnepsnai / README.md
Created February 26, 2022 23:45
Better Podman SystemD Unit

This is a systemd unit file for running a podman container as a systemd service.

For rootless containers, you can use systemd user units (More info)

Broken down, it does the following:

  1. ExecStartPre pulls the image. If you use the :latest tag, then every time you start this service it'll pull the latest version
  2. ExecStart runs the container. It's important to use a container name, since it's referenced elsewhere. Don't detact the container (I.E. don't include -d)
  3. ExecStopPost after the container is stopped, it'll remove the container (if it is still present), and remove the image. Removing the image is useful if you're using the :latest image tag.
@ecnepsnai
ecnepsnai / setup.md
Last active June 14, 2025 22:47
Windows 10 New PC Setup

Windows 10 New PC Setup

The Basics

Local account only

Don't link a local workstation account with an online account.

For Windows 10 Home, during OOBE do not connect to a network (Click "I don't have internet"), otherwise you are forced to use a Microsoft account. Windows 10 Pro installs give you the choice even if you do connect to the internet.

@ecnepsnai
ecnepsnai / update_go.sh
Last active June 14, 2025 22:48
Script to manage go versions easily
#!/bin/bash
set -e
VERSION=$(curl -sS "https://go.dev/dl/?mode=json" | jq -r '.[0].version' | sed 's/go//')
INSTALL_DIR="/usr/local/go"
if [[ ! -d ${INSTALL_DIR} ]]; then
echo "Install directory '${INSTALL_DIR}' does not exist, sudo required to create it..."
sudo mkdir -p ${INSTALL_DIR}
fi
@ecnepsnai
ecnepsnai / Image.cs
Last active June 17, 2021 20:15
Bing Image of the Day
// Bing Image of the Day for C#
// If you're using this in your project, give this gist a 'Star'!
// Made by Ian Spence with <3 in Vancouver, British Columbia, Canada
using System;
using System.Xml;
using System.Net;
public Uri GetImage() {
if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() == false) {