Skip to content

Instantly share code, notes, and snippets.

View BuriedStPatrick's full-sized avatar

Patrick Christensen BuriedStPatrick

View GitHub Profile
@BuriedStPatrick
BuriedStPatrick / autoexec.cfg
Created April 26, 2024 16:55
Counter-Strike 2 autoexec
echo "------------------------"
echo "--- Loading autoexec ---"
echo "------------------------"
// -- Viewmodel
viewmodel_offset_x 2
viewmodel_offset_y -2
viewmodel_offset_z -2
viewmodel_fov 68
// cl_bob_lower_amt 30
@BuriedStPatrick
BuriedStPatrick / readme.md
Created February 8, 2024 11:11
Installing .NET & PowerShell properly on Linux by ignoring Microsoft's bad suggestions

Installing .NET & PowerShell properly on Linux by ignoring Microsoft's bad suggestions

Set the following variables:

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$HOME/.dotnet/:$PATH
export PATH=$HOME/.dotnet/tools/:$PATH
@BuriedStPatrick
BuriedStPatrick / readme.md
Created February 7, 2024 13:04
Install Cogin QueueExplorer on Arch Linux

Install Install Cogin QueueExplorer on Arch Linux

The guide on Cogin's website for installing on "Linux" actually means installing on a Debian-based system. This guide Arch-ifies the process. This could be made into an AUR package, but I don't have the knowledge or time to maintain such a package, so here's the (hopefully) not outdated way of installing it.

1. Install the pre-requisite software.

sudo pacman -S wine cabextract
@BuriedStPatrick
BuriedStPatrick / Get-PackageReference.ps1
Last active November 13, 2023 17:18
Manage PackageReferences with PowerShell
# Get all PackageReferences from a project or solution
# Does NOT include transient dependencies
# Example A: Get-PackageReference ./MySolution.sln
# Example B: Get-ChildItem -Recursive *.csproj | Get-PackageReference
function Get-PackageReference {
[CmdletBinding()]
param (
[Parameter(
Mandatory = $true,
ValueFromPipeline = $true,
@BuriedStPatrick
BuriedStPatrick / readme.md
Last active October 21, 2023 17:41
Controlling Philips Hue with DMX via QLC+

Controlling Philips Hue with DMX via QLC+

Should work on Windows, Linux and MacOS. I've only tested Windows so far.

Pre-requisites

  • [NodeJS][1].
  • [Philips Hue Bridge][4].
  • One or more Philips Hue products connected to the Hue Bridge.
  • Your computer should be running on the same network as your Hue devices.
@BuriedStPatrick
BuriedStPatrick / forwarding-cli-commands-to-apx-run.md
Last active March 3, 2023 14:08
Forwarding CLI commands to APX run tools

Forwarding CLI commands to APX run tools

VanillaOS's APX tool is quite neat since you can export desktop-entries with apx export <program>. However, if you like to run CLI tools on your host system without apx enter it's a bit trickier. Here's a little guide on how you can get around this using she-bang scripts.

Steps

  1. Create a folder somewhere in your home-directory structure that you'd like to contain shebang scripts. I'm just going to use ~/scripts as a starting point.

  2. Add the folder to your shell's PATH environment variable:

@BuriedStPatrick
BuriedStPatrick / queue-explorer-with-flatpak.md
Last active March 3, 2023 11:26
Installing QueueExplorer with Bottles using Flatpak

Installing QueueExplorer using Flatpak

Installing QueueExplorer on Linux can be a pain. I've found the official guide inadequate as it assumes you're using the apt package manager to install Wine and so on. It's just a bad install script.

Instead, let's install using a universal approach with Flatpak and Bottles. This guide assumes you already have Flatpak installed on your system.

  1. Install Bottles using flatpak
flatpak install com.usebottles.bottles
@BuriedStPatrick
BuriedStPatrick / readme.md
Last active September 22, 2022 14:36
C# Best Practices (opinionated)

Best Practices

Enable nullable

There's really no reason not to enable Nullable. It's enabled by default on .NET 6.0 projects for a reason. It gently pushes you into taking into account times where your input or output could be null by warning you of potential dangers.

<Project Sdk="Microsoft.NET.Sdk.Web">
...
 
@BuriedStPatrick
BuriedStPatrick / Pwsh.psm1
Last active March 17, 2021 20:24
Update/Install latest Powershell version
function Install-Powershell([string] $version)
{
# in case the version was specified with a prefix, strip it
$version = $version.Replace('v', '')
Write-Host "Downloading $version..."
$output = "PowerShell-$version-win-x64.msi"
$url = "https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-x64.msi"
try {
@BuriedStPatrick
BuriedStPatrick / Custom zoom and scroll for mousewheel
Last active June 9, 2020 06:44
Custom Zoom/Scroll for Reaper
# Zoom Horizontally and Vertically
ACT 0 32060 "4bdc082639aee448bb6399c2cd265564" "View: Zoom Horizontally and Vertically" 40430 40431
KEY 255 6395 _4bdc082639aee448bb6399c2cd265564 32060
ACT 0 0 "9abdb95e7e387241b2ef15a03db46e8b" "View: Zoom Horizontally and Vertically" 990 991
KEY 255 253 0 0
KEY 255 6395 _9abdb95e7e387241b2ef15a03db46e8b 0
# Zoom vertically
KEY 255 6394 991 0
KEY 255 6394 40430 32060