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
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active November 18, 2024 11:01
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 ")
@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