Skip to content

Instantly share code, notes, and snippets.

Avatar
🕵️‍♂️
Investigating a better artifact workflow

Jake Morrison techthoughts2

🕵️‍♂️
Investigating a better artifact workflow
View GitHub Profile
@techthoughts2
techthoughts2 / powershell.json
Last active Apr 11, 2021
Collection of PowerShell Snippets for VSCode
View powershell.json
"Help": {
"prefix": "help",
"body": [
"<#",
".SYNOPSIS",
"\tShort description",
".DESCRIPTION",
"\tLong description",
".EXAMPLE",
"\tC:\\PS>",
@techthoughts2
techthoughts2 / python.json
Last active Apr 11, 2021
Collection of Python Snippets for VSCode
View python.json
{
"if": {
"prefix": "if",
"body": ["if ${1:expression}:", "\t${2:pass}"],
"description": "Code snippet for an if statement"
},
"if/else": {
"prefix": "if/else",
"body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"],
"description": "Code snippet for an if statement with else"
@techthoughts2
techthoughts2 / settings.json
Last active Apr 11, 2021
Current Windows Terminal Settings
View settings.json
// This file was initially generated by Windows Terminal 0.11.1333.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
// C:\Users\user\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
View .jake.omp.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
// {
// "type": "text",
// "style": "plain",
View install_pwsh_7
iex "&amp; { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
View az_pwsh.ps1
Connect-AzAccount
View install_powershell
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
View linux_notes.sh
ssh 10.0.4.3 -l jake
# read the manual pages - kind of like help
man
man cp # read the manual on the cp command
man 2 sync # gets you man page 2
manpath # where are man files located
<<'###ManPageSections'
1 User level commands and applications
View monitor_input_switch
<#
.SYNOPSIS
Helper function to set the monitor input.
.DESCRIPTION
Uses ControlMyMonitor.exe to adjust VPCCode 60 for your monitor input.
.EXAMPLE
Set-MonitorInputSource -InputSource HDMI
Switched to HDMI input
.EXAMPLE
@techthoughts2
techthoughts2 / Verify_Windows_CompName
Last active Feb 5, 2021
This retrieves the computer name and then regex validates that name against common windows machine name requirements. If the computer name matches Windows name requirements it will return true, otherwise it will return false.
View Verify_Windows_CompName
<#
.Synopsis
Verifies if computername matches Windows machine naming requirements
.DESCRIPTION
This function accepts a computername string and regex verifies if that name meets Windows machine naming requirements
.PARAMETER ComputerName
String of computername to be tested
.EXAMPLE
Test-ComputerName -ComputerName PC-Num-43123
This will verify if the computer name meets windows requirements