Skip to content

Instantly share code, notes, and snippets.

View vexx32's full-sized avatar
💜
Turn your faults into faultlore and share them with the world.

Rain Sallow (/u/ta11ow) vexx32

💜
Turn your faults into faultlore and share them with the world.
View GitHub Profile
@vexx32
vexx32 / Set-Wallpaper.ps1
Created December 14, 2021 14:08
PowerShell function that changes Windows wallpaper with p/invoke
function Set-Wallpaper {
<#
.SYNOPSIS
Applies a specified wallpaper to the current user's desktop
.EXAMPLE
Set-WallPaper -Image "C:\Wallpaper\Default.jpg"
#>
[CmdletBinding()]
param(
@vexx32
vexx32 / checksum.ps1
Created September 20, 2021 19:09
checksum comparison for files vs a given checksum file
function Test-Checksum {
[CmdletBinding()]
[Alias('checksum')]
param(
[Parameter(Mandatory, Position = 0)]
[string]
$Path,
[Parameter(Mandatory, Position = 1)]
[string]
@vexx32
vexx32 / drawing example.ps1
Last active December 23, 2020 22:59
quick example for system.drawing text to an image
if (-not ('System.Drawing.Bitmap' -as [type])) {
Add-Type -AssemblyName System.Drawing
}
[System.Drawing.Bitmap] $Image = [System.Drawing.Bitmap]::new(100, 100)
$Image.SetResolution(96, 96)
[System.Drawing.Graphics] $DrawingSurface = [System.Drawing.Graphics]::FromImage($Image)
$DrawingSurface.PageScale = 1.0
@vexx32
vexx32 / PowershellLoopBehavior.md
Last active January 15, 2022 10:36 — forked from JustinGrote/PowershellLoopBehavior.md
Reference Table for Loop Behavior in Powershell
Loop Return Continue Break
Normal Expectation Exit Scope Next Item Exit Loop
.foreach{} Next Item Break Scopes / Next Item of Parent Loop Break Scopes / Exit Parent Loop
foreach ($y in $x) Exit Scope Next Item Exit Loop
for ($i;$i -lt 5;$i++) Exit Scope Next Item Exit Loop
Foreach-Object -InputObject @() Next Item Break Scopes / Next Item of Parent Loop Break Scopes / Exit Parent Loop
Switch Exit Scope Next Item Exit Switch
While
@vexx32
vexx32 / start-noita.ps1
Last active March 21, 2024 10:56
Starts Noita from the given path, optionally with a specific seed set.
function Start-Noita {
<#
.SYNOPSIS
Starts Noita from a PowerShell prompt, optionally with a specific set seed for a new game.
.DESCRIPTION
To use this function, copy and paste the complete function definition into a PowerShell
session, and then invoke it with `Start-Noita`. Supply `-Seed somevalue` if you would like
to run a specific seed (see the examples below).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.