This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Spectre.Console; | |
namespace ListTest | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
List<string> TestList = [ "Test1", "Test 2", "Test Three", "TestFour"]; | |
int Index = AnsiConsole.Prompt( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net.Mail; | |
using Spectre.Console; | |
namespace PromptForEmail | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
PromptForEmail("Enter your email address:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-ToPath { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] | |
$Path | |
) | |
begin { | |
$UserPath = [Environment]::GetEnvironmentVariable('Path', 'User') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
[string] | |
$Source, | |
[Parameter()] | |
[bool] | |
$SymbolicLink = $false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CC0 1.0 License (https://creativecommons.org/publicdomain/zero/1.0) */ | |
body { | |
margin: auto; | |
padding-right: 1em; | |
padding-left: 1em; | |
max-width: 44em; | |
color: black; | |
font-family: Verdana, sans-serif; | |
font-size: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2024 Timberfang | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2024 Timberfang | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Wait-Disc { | |
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
[int] | |
$DriveIndex = 0 | |
) | |
# Derive drive letter | |
$DriveLetter = ($DriveInfo | Select-Object -ExpandProperty Drive)[$DriveIndex] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Get the the CPU usage, RAM usage, and disk usage of the currently running computer. | |
.DESCRIPTION | |
Retrieve the CPU, RAM, and disk usage of the current system. | |
Get-PerformanceStats assumes Megabytes as the default units, but it will switch to gigabytes if the megabyte values exceed 1,000. | |
.NOTES | |
Currently this script only supports Microsoft Windows. | |
.EXAMPLE | |
Get-PerformanceStats.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
List basic information about the computer. | |
.DESCRIPTION | |
Lists the computer name, user account, OS, CPU model, GPU model, currently installed RAM, motherboard model, currently running antivirus, | |
local IP address, and public IP address. | |
This script currently runs only on Windows due to the lack of the Get-ComputerInfo, Get-PnpDevice, and Get-CimInstance cmdlets on MacOS and Linux. | |
.EXAMPLE | |
PS C:\>.\Get-SystemInfo.ps1 |
NewerOlder