Skip to content

Instantly share code, notes, and snippets.

View ecnepsnai's full-sized avatar
🔐
All your bits are belong to me

Ian Spence ecnepsnai

🔐
All your bits are belong to me
View GitHub Profile
@ecnepsnai
ecnepsnai / ScrollLock+Numpad.ahk
Created February 17, 2024 04:07
Scroll Lock Numpad
#If GetKeyState("ScrollLock", "t")
1::Numpad1
2::Numpad2
3::Numpad3
4::Numpad4
5::Numpad5
6::Numpad6
7::Numpad7
8::Numpad8
9::Numpad9
@ecnepsnai
ecnepsnai / ContentView.swift
Created September 16, 2023 02:08
SwiftUI Regression
//
// ContentView.swift
// SwiftUITest
//
// Created by Ian Spence on 2023-09-15.
//
import SwiftUI
struct ContentView: View {
@ecnepsnai
ecnepsnai / psp.json
Created August 17, 2023 21:04
PSP FFMpeg Preset
{
"PresetList": [
{
"AlignAVStart": false,
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
@ecnepsnai
ecnepsnai / Update-Golang.ps1
Last active January 16, 2024 21:07
Install or Update Go on Windows
function Get-LatestRelease() {
$response = Invoke-WebRequest "https://go.dev/dl/?mode=json"
$results = ConvertFrom-JSON $response
$latest = $results[0]
$arch = "amd64"
if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
$arch = "arm64"
}
@ecnepsnai
ecnepsnai / Update-GeforceDrivers.ps1
Created April 21, 2023 01:02
Powershell Update Geforce Drivers
<#
.SYNOPSIS
Download and install the latest Nvidia GeForce drivers
.PARAMETER SeriesID
The product series ID. Defaults to "GeForce RTX 20 Series"
.PARAMETER FamilyID
The product family ID. Defaults to "GeForce RTX 2080 Super"
.PARAMETER OSID
The operating system ID. Defaults to Windows 11.
.PARAMETER LanguageCode
@ecnepsnai
ecnepsnai / vyos.md
Last active November 10, 2022 04:19
Build VyOS with custom package

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.mobileconfig
Last active February 28, 2023 04:49
Disables bad/annoying/borderline-malicious features of Edge, making it a tolerable browser.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>UserFeedbackAllowed</key>
<false/>
<key>AutofillCreditCardEnabled</key>
@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 November 23, 2022 07:32
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 July 24, 2023 05:54
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