Skip to content

Instantly share code, notes, and snippets.

Avatar
🔐
All your bits are belong to me

Ian Spence ecnepsnai

🔐
All your bits are belong to me
View GitHub Profile
@ecnepsnai
ecnepsnai / vyos.md
Last active Nov 10, 2022
Build VyOS with custom package
View vyos.md

Build VyOS with Custom Packages

VyOS allows you to include custom packages when an image is built.

Requirements

  • Debian packages compiled for the correct kernel release matching the VyOS release (I.E. don't use Ubuntu packages)
  • A GPG key. Any old key will do, because just like GPG itself - it doesn't really matter.

Sign and serve the packages

@ecnepsnai
ecnepsnai / edge.reg
Last active Aug 18, 2022
Disables bad/annoying/borderline-malicious features of Edge, making it a tolerable browser.
View edge.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"UserFeedbackAllowed"=dword:00000000
"AutofillCreditCardEnabled"=dword:00000000
"EdgeCollectionsEnabled"=dword:00000000
"ShowMicrosoftRewards"=dword:00000000
"EdgeShoppingAssistantEnabled"=dword:00000000
"PersonalizationReportingEnabled"=dword:00000000
"ShowRecommendationsEnabled"=dword:00000000
@ecnepsnai
ecnepsnai / README.md
Created Feb 26, 2022
Better Podman SystemD Unit
View README.md

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 / zfs_backup_restore.md
Last active Nov 7, 2021
Backup & Restore ZFS to External USB Drive
View zfs_backup_restore.md

Backup

1. Take a snapshot

Take a snapshot of the zpool you wish to backup

zfs snapshot tank@backup-jan-2020
@ecnepsnai
ecnepsnai / setup.md
Last active Nov 23, 2022
Windows 10 New PC Setup
View setup.md

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 Mar 24, 2022
Script to manage go versions easily
View update_go.sh
#!/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 Jun 17, 2021
Bing Image of the Day
View Image.cs
// 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) {