Skip to content

Instantly share code, notes, and snippets.

using System.Text.Json;
namespace HorizonREST.Models
{
public class AuthResponse
{
public string access_token { get; set; }
public string refresh_token { get; set; }
public string HorizonServer { get; set; }
public AuthResponse() { }
@Largehawiian
Largehawiian / TFSample.tf
Last active June 24, 2024 19:10
TF Sample
variable "vsphere_user" {}
variable "vsphere_password" {}
variable "vsphere_server" {}
variable "vsphere_nic_type" {}
variable "windows_dc_name" {}
variable "windows_dcoex_name" {}
variable "windows_fs_name" {}
variable "windows_cs_name" {}
variable "windows_ca_name" {}
variable "windows_av_name" {}
@Largehawiian
Largehawiian / things.txt
Last active December 28, 2023 20:10
things
/provision /domain ftidev /machine TextXXXX /savefile TextXXXX.txt /reuse
Add-Type -OutputType ConsoleApplication -OutputAssembly print_argv.exe -TypeDefinition @'
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace PrintArgv
{
class Program
{
@Largehawiian
Largehawiian / program.cs
Created September 15, 2023 14:13
C# API Server
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.ServiceProcess;
using System.Text;
Function _MouseClicker {
[cmdletbinding()]
param(
[int]$SecondsToRun,
[int]$SleepSeconds,
[Switch]$RunForever
)
Function Get-MousePosition {
Add-Type -AssemblyName System.Windows.Forms
$return = [PSCustomObject]@{
@Largehawiian
Largehawiian / UI.ps1
Last active January 13, 2023 16:23
Clipboard manager
[cmdletbinding()]
param(
$SyncHash
)
#-------------------------------------------------------------#
#----XML Form Declarations------------------------------------#
#-------------------------------------------------------------#
Add-Type -AssemblyName PresentationCore, PresentationFramework, System.Windows.Forms
Add-Type -AssemblyName PresentationCore
function argb2box {
$c = ($args[0] -split '#..(.{2})(.{2})(.{2})')
$r, $g, $b = ("$c" -join (' ')).trim() -split ' '
return "`e[48;2;$([Int32]"0x$r");$([Int32]"0x$g");$([Int32]"0x$b")m `e[0m"
}
$sc = [System.Windows.Media.Colors]
$array = $sc | Get-Member -static -Type Property | Select-Object -Expand Name | ForEach-Object {
[pscustomobject]@{
ARGB = "$($sc::$_)"
@Largehawiian
Largehawiian / Clock.ps1
Last active January 10, 2023 00:42
Ugly Clock
#-------------------------------------------------------------#
#----Initial Declarations-------------------------------------#
#-------------------------------------------------------------#
using namespace System.Windows
using namespace System.Windows.Controls
using namespace System.Windows.Threading
Add-Type -AssemblyName PresentationCore, PresentationFramework, WindowsBase
$Xaml = @"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="800" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" WindowStartupLocation="CenterScreen" Title="Window Title">
Function Get-Colors {
$colors = [enum]::GetValues([System.ConsoleColor])
Foreach ($bgcolor in $colors) {
Foreach ($fgcolor in $colors) { Write-Host "$fgcolor|" -ForegroundColor $fgcolor -BackgroundColor $bgcolor -NoNewLine }
Write-Host " on $bgcolor"
}
}
@Largehawiian
Largehawiian / VMWare.json
Created November 21, 2022 22:30
Grafana
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "InfluxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}