Skip to content

Instantly share code, notes, and snippets.

View gsmitheidw's full-sized avatar

Graham Smith gsmitheidw

View GitHub Profile
#Send Keypresses
$wshell = new-object -com wscript.shell
$wshell.SendKeys("{CAPSLOCK}")
# Graphical input
$data = [Microsoft.VisualBasic.Interaction]::InputBox('hi user give me your data', 'inputboxtitle')
# Graphical output
[Microsoft.VisualBasic.Interaction]::MsgBox("tada", "OKOnly,SystemModal,Information", "msgboxtitle")
@gsmitheidw
gsmitheidw / Linux-commands.sh
Last active February 11, 2022 09:27
Useful Linux commands and snippets
# For those times you just can't remember the name of the command that you only use occasionally
# These are snippets, not a script!
# live bandwidth usage expressed graphically with ascii
nload
speedometer -r eth0 -t eth0
# general system monitoring
glances
# variants of top
atop
@supercheetah
supercheetah / Get-CDPInfo.ps1
Created October 30, 2015 20:34
Gets the CDP information from a Windows computer with PowerShell.
<#
.SYNOPSIS
Gets the CDP information from a computer.
.DESCRIPTION
Attempts to get the CDP information from a computer. It automatically downloads tcpdump.exe if it's not already on a computer.
.PARAMETER DeviceNumber
Alias: dn