Skip to content

Instantly share code, notes, and snippets.

@TheNathannator
TheNathannator / GIP Interface Writeup.md
Last active April 23, 2024 21:46
A writeup on how to interact with the Xbox One driver on Windows directly

GIP Interface

A writeup on how to directly communicate with GIP (Xbox One) devices on a basic level.

I tried Windows.Gaming.Input.Custom and was unable to get it to work, so I resorted to this. Would have liked if I could do things more legitimately with what little documentation was provided, but oh well.

This writeup is not at all comprehensive of every possibilty with the interface, otherwise there'd be far too much to go through.

Thanks to the XInputHooker project for having a bunch of function detours set up, made my life easier when doing all of this.

## get interface name (ovs_eth0 below) via ip link
ip link add macvlan0 link ovs_eth0 type macvlan mode bridge
##192.168.4.204/30 (204-207)
ip addr add 192.168.4.204/30 dev macvlan0
ip link set macvlan0 up
ip route add 192.168.44.204/30 dev macvlan0
docker network create frontend
@axelheer
axelheer / ConvertTo-CentralPackageManagement.ps1
Last active June 15, 2024 00:16
Generates a `Directory.Packages.props` based on all your project files
function ConvertTo-CentralPackageManagement() {
Write-Host 'Searching for package references'
$packages = @{}
$conditionalPackages = @{}
foreach ($csproj in (Get-ChildItem -Include *.csproj, *.props -Recurse)) {
$root = [xml]($csproj | Get-Content -Raw)
foreach ($itemGroup in $root.Project.ItemGroup) {
foreach ($packageReference in $itemGroup.PackageReference) {
if ($packageReference.Include -and $packageReference.Version) {
@Jaykul
Jaykul / WslHelper.psm1
Last active January 28, 2024 22:54
Some functions I wrote to fix WSL problems
function ConvertFrom-IniContent {
<#
.SYNOPSIS
Parses content from ini/conf files into nested hashtables.
.EXAMPLE
Get-Content \\wsl$\Ubuntu\etc\wsl.conf | ConvertFrom-IniContent
.EXAMPLE
ConvertFrom-IniContent (Get-Content ~\.wslconf -Raw)
.EXAMPLE
"
@1kastner
1kastner / run_python_script_in_conda_env.bat
Last active March 5, 2024 08:27 — forked from maximlt/run_python_script_in_conda_env.bat
Run a Python script in a conda environment from a batch file
@ECHO OFF
SETLOCAL EnableDelayedExpansion
REM Insert your conda env here
SET CONDA_ENV=MY_DESIRED_CONDA_ENV
CALL :activate_conda_env
REM Insert your python script here
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active June 21, 2024 13:29
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@davidfowl
davidfowl / .NET6Migration.md
Last active July 15, 2024 15:31
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active June 28, 2024 17:42
Minimal APIs at a glance
@nbarnwell
nbarnwell / GitVersionIncrement.ps1
Last active August 4, 2023 15:38
Simple PowerShell script to create the appropriate next tag on a git repo
function Get-Version {
# TODO: Implement a call to GitVersion on the command line to find the current version from the repo
}
function New-Tag {
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string] $Tag)
process {
@codebytes
codebytes / DevMachineSetup.ps1
Last active July 14, 2024 01:10
DevMachineSetup
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12