Skip to content

Instantly share code, notes, and snippets.

View TonaIslas-Git's full-sized avatar
🎯
Focusing

Tonatiuh Islas TonaIslas-Git

🎯
Focusing
View GitHub Profile
@MyITGuy
MyITGuy / Get-OSProductType.ps1
Last active November 1, 2023 19:07
PowerShell: Get the operating system product type.
function Get-OSProductType {
[CmdletBinding(SupportsShouldProcess=$True,DefaultParameterSetName="None")]
PARAM(
[Parameter(Mandatory = $false, Position = 0, ValueFromPipeline = $true)]
[string]$ComputerName = $env:COMPUTERNAME
)
<#
.SYNOPSIS
Get the operating system product type.
.DESCRIPTION
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active July 22, 2024 13:03
Dead simple python function for getting a yes or no answer.
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return yes_or_no("Uhhhh... please enter ")