Skip to content

Instantly share code, notes, and snippets.

Avatar
💖
Stay warm

Rain Sallow (/u/ta11ow) vexx32

💖
Stay warm
View GitHub Profile
@vexx32
vexx32 / Set-Wallpaper.ps1
Created Dec 14, 2021
PowerShell function that changes Windows wallpaper with p/invoke
View Set-Wallpaper.ps1
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 Sep 20, 2021
checksum comparison for files vs a given checksum file
View checksum.ps1
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 Dec 23, 2020
quick example for system.drawing text to an image
View drawing example.ps1
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 Jan 15, 2022 — forked from JustinGrote/PowershellLoopBehavior.md
Reference Table for Loop Behavior in Powershell
View PowershellLoopBehavior.md
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 Oct 2, 2022
Starts Noita from the given path, optionally with a specific seed set.
View start-noita.ps1
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).
View The Song of Gracia.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View One Step--Moonglow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View I Am Taliesin. I Sing Perfect Metre.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Sonnet. Written On A Blank Space At The End Of Chaucer's Tale Of 'The Floure And The Lefe'.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Advice to Avoid Bad Company.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.