Skip to content

Instantly share code, notes, and snippets.

@seffyroff
seffyroff / elite-focus.ahk
Created Aug 5, 2022 — forked from tKe/elite-focus.ahk
AutoHotkey Focus Elite: Dangerous on Joystick Movement
View elite-focus.ahk
#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.
View keybase.md

Keybase proof

I hereby claim:

  • I am seffyroff on github.
  • I am seffyroff (https://keybase.io/seffyroff) on keybase.
  • I have a public key ASBbmH10gdfd6cNz7mxv1FHFXd8mGoh1CRNGaK_RXbdIvwo

To claim this, I am signing this object:

View Switch-HyperVGpuPartitionAdapter.ps1
param(
[Parameter(Mandatory)][string]$vmName
)
$InformationPreference = "Continue"
$ErrorActionPreference = "Stop"
try {
$vmPartitionAdapter = Get-VMGpuPartitionAdapter -VMName $vmName
if ($vmPartitionAdapter) {
Write-Information "Removing Partition Adapter. Checkpoints work."
View Ubuntu 18.04, DBUS Fix Instructions with Troubleshooting
Ubuntu 18.04, DBUS Fix Instructions with Troubleshooting
After asking if there were updated instructions, and promising to write it up if I could figure it out...https://www.reddit.com/r/bashonubuntuonwindows/comments/9l46br/asking_wsl_ubuntu_1804_dbus_fix_updated/
From a truly clean 18.04.1 install it should be this:
sudo apt install dbus-x11
sudo systemd-machine-id-setup
@seffyroff
seffyroff / Run Visual Studio Code for Linux from WSL.md
Created Nov 15, 2018 — forked from fedme/Run Visual Studio Code for Linux from WSL.md
Run Visual Studio Code for Linux from WSL on Windows 10
View Run Visual Studio Code for Linux from WSL.md

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

View 2018-11-08_21-43-15.txt
seffyroff@maasvm:~$ sudo ./lxd-p2c rombus.lan maas / --rsync-args="-vvv --exclude=/var/cache"
Generating a temporary client certificate. This may take a minute...
Certificate fingerprint: b8b5087b293d2e4891fddb416e390b31c5ae3b16c22de192779e5751520bb2b6
ok (y/n)? y
Admin password for https://rombus.lan:8443:
opening connection using: sh -c "/home/seffyroff/lxd-p2c netcat @lxd-p2c/bfba53aa-d314-4d52-87d2-6f21e3e5a3fb" localhost rsync --server -vvvlogDtpXrSze.iLsfxC --compress-level=2 --delete --partial --numeric-ids . /tmp/foo (13 args)
sending incremental file list
[sender] make_file(rootfs,*,0)
send_file_list done
[sender] pushing local filters for /tmp/lxd-p2c_mount_728675622/rootfs/
View 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
"""
View profile.lxd-super-privileged.yaml
config:
boot.autostart: "true"
linux.kernel_modules: openvswitch,nbd,ip_tables,ip6_tables,kvm
raw.apparmor: mount,
raw.lxc: |-
lxc.cgroup.devices.allow = c 10:237 rwm
lxc.cgroup.devices.allow = b 7:* rwm
lxc.cgroup.devices.allow = b 259:* rwm
lxc.cgroup.devices.allow = b 230:* rw
security.nesting: "true"
View setup-lxd-profile.sh
#!/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
View netboot.xyz-edgerouter.md

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: