Skip to content

Instantly share code, notes, and snippets.

$list = @"
1 Partridge in a pear tree
2 Turtle Doves
3 French Hens
4 Calling Birds
5 Golden Rings
6 Geese a laying
7 Swans a swimming
8 Maids a milking
9 Ladies dancing
@SadProcessor
SadProcessor / 3rdPartyCode.ps1
Last active April 13, 2016 21:44
3rd party Code: If you can't read it, you shouldn't run it...
#############################################################################
$t = "3rd party Code: If you can't read it, you shouldn't run it..."
#############################################################################
$V = @('a';'e';'i';'o';'u';'y';'A';'E';'I';'O';'U';'Y')
foreach($x in $v){$t = $t.replace($x,('"+$v['+($v.IndexOf($x))+']+"'))}
$t = '$V = @("a";"e";"i";"o";"u";"y";"A";"E";"I";"O";"U";"Y");'+'"'+$t+'"'|`
clip.exe
#############################################################################
# press F5 in console & ctrl-V into a new powershell console for demo #
#############################################################################
@SadProcessor
SadProcessor / Play-TetrisTuneForever.ps1
Created April 11, 2016 20:01
PowerShell Timeless classic... EndlessLoop
#Endless PowerShell Tetris tune
#adapted from https://gist.github.com/XeeX/6220067
function Play-TetrisTuneForever(){
While(1 -eq 1){
[console]::beep(658, 125)
[console]::beep(1320, 500)
[console]::beep(990, 250)
[console]::beep(1056, 250)
[console]::beep(1188, 250)
[console]::beep(1320, 125)
#########################################################################
# $$\ $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$\ $$\ $$\ #
# $$ | $$ ___$$\ $$ ___$$\ $$ | $$ __$$\ $$ | $$ | $$ | #
# $$ | \_/ $$ |\_/ $$ |$$$$$$\ $$ | $$ |$$ | $$ |$$$$$$\ #
# $$ | $$$$$ / $$$$$ / \_$$ _| $$$$$$$ |$$$$$$$$ |\_$$ _| #
# $$ | \___$$\ \___$$\ $$ | $$ __$$< \_____$$ | $$ | #
# $$ | $$\ $$ |$$\ $$ | $$ |$$\ $$ | $$ | $$ | $$ |$$\ #
# $L33tR4t\\$Kali$ |\$Linux | \$$$$ |$$ | $$ | $$ | \$ISO | #
# \________|\______/ \______/ \____/ \__| \__| \__| \____/ #
#########################################################################
@SadProcessor
SadProcessor / Out-Loud.ps1
Last active November 8, 2016 01:30
PoSh Text-to-Speech
function Out-Loud(){
Param(
#Message
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)]
[ValidateNotNull()]
[String[]]$Speech,
#Voice
[ValidateSet('David', 'Zira', 'Hazel')]
function Out-Loud(){
Param(
#Message
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)]
[ValidateNotNull()]
[String[]]$Text,
#Voice
[ValidateSet('David', 'Zira', 'Hazel')]
@SadProcessor
SadProcessor / PoShSysX.ps1
Last active December 10, 2016 14:22
PoShSysX >> External SysInternal toolbox via PowerShell - When you forgot your tools...
##PoShSysX.v1 - WalterLegowski
<#
.Synopsis
PoShSysX: External SysInternal toolbox via PowerShell
.DESCRIPTION
This cmdlet generates a powershell string that can be run on the localhost (default) or used as scriptblock for other tool (via clipboard).
When executed, connects \\live.sysinternals.com\tools\ as PSDrive and runs .exe from that path.
Always latest version of tools. No install to disk. (But slower...)
.EXAMPLE
@SadProcessor
SadProcessor / ca.txt
Created January 12, 2017 00:05
Half-a-Calc
ca
@SadProcessor
SadProcessor / lc.txt
Created January 12, 2017 00:06
Other-Half-a-Calc
lc