Skip to content

Instantly share code, notes, and snippets.

@seffyroff
seffyroff / BuildProject.xml
Created May 2, 2024 18:37 — forked from regner/BuildProject.xml
A sample BuildGraph script for building, cooking, and packaging an Unreal project.
<?xml version='1.0' ?>
<!--
Why is this one giant script instead of a bunch of smaller scripts?
Mostly this comes down to BuildGraph and personal preference. As the language BuildGraph isn't
really much of a programming language there is no easy way to use an IDE and jump between
includes, find usages of variables, and just generally quickly search things. It was found to
be easier to have a single large file that a developer can quickly jump up and down in when
trying to understand what the BuildGraph script is doing.
@seffyroff
seffyroff / elite-focus.ahk
Created August 5, 2022 18:27 — forked from tKe/elite-focus.ahk
AutoHotkey Focus Elite: Dangerous on Joystick Movement
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
SetFormat, float, 03 ;remove decimals from joystick values
;This script will activate your game window whenever
;any joystick axis changes. Handy for when you're
;Alt-Tabbed out of the game on your second monitor.
param(
[Parameter(Mandatory)][string]$vmName
)
$InformationPreference = "Continue"
$ErrorActionPreference = "Stop"
try {
$vmPartitionAdapter = Get-VMGpuPartitionAdapter -VMName $vmName
if ($vmPartitionAdapter) {
Write-Information "Removing Partition Adapter. Checkpoints work."
@seffyroff
seffyroff / Run Visual Studio Code for Linux from WSL.md
Created November 15, 2018 19:34 — forked from fedme/Run Visual Studio Code for Linux from WSL.md
Run Visual Studio Code for Linux from WSL on Windows 10

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

@seffyroff
seffyroff / update-juju-unit-hostnames.py
Created October 24, 2018 22:45 — forked from niedbalski/update-juju-unit-hostnames.py
update-juju-unit-hostnames.py
#!/usr/bin/env python
"""
This script will update all the juju units using
the hostname defined on the provided dns server
Usage:
{0} ip-of-maas-dns-server
"""
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted

Setting up netboot.xyz with an EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Assumptions

I've made a few assumptions throughout this document that will probably be different for your setup: