Skip to content

Instantly share code, notes, and snippets.

View Siikakala's full-sized avatar

Mira Ojamo Siikakala

View GitHub Profile
<#
.SYNOPSIS
Keep account of Harptos calendar. Mainly helper script for Touch Portal
.DESCRIPTION
I wrote the script for my own use, to get the Faerûn calendar info visible to Touch Portal.
When changing or setting date, script doesn't produce any output as that's the intended invocation from touch portal.
Instead it will write the info to text file, of which is defined in the parameters. It can handle fancier Waterdeep styled
output, or more straightforward, standard way.
@Siikakala
Siikakala / vectorama.ps1
Last active March 12, 2023 14:08
Some Vectorama 2022 ASCII art with powershell - Just because I can x)
[CmdletBinding()]
param()
if ($host.UI.RawUI.WindowSize.Width -lt 324 -or $host.UI.RawUI.WindowSize.Height -lt 70) {
if ($null -ne $env:WT_SESSION) {
# Windows Terminal - don't want to touch
Write-Error "Detected Windows Terminal session and too small window!"
Write-Host "`nOutput requires at least 324x75 characters window, please resize it manually. Your current window is: $($host.UI.RawUI.WindowSize.Width)x$($host.UI.RawUI.WindowSize.Height)`n`nRecommended method: Alt-enter to full screen, then zoom out with ctrl-minus until output fits"
exit
}
else {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

<#
.SYNOPSIS
Change production state of machine in Zenoss4
.DESCRIPTION
This script takes array of machines and sets their production state to some other. Returns current
and previous states of machines as integer
.EXAMPLE
.\zenoss_productionstate.ps1 -Computers computer1.example.com -ProductionState Maintenance