mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-01 07:55:41 +02:00
Renamed to simulate-matrix.ps1
This commit is contained in:
parent
d7a202a182
commit
82ee296b79
@ -1,21 +1,29 @@
|
|||||||
A,B,C,D,E,F,G
|
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
|
||||||
" ","P"," "," "," "," ","H"
|
" ","P"," "," "," "," ","H"," "," "," ","R"," "," "," "," "," "," "," ","B"," "," "," "," "," ","M"
|
||||||
" ","O"," "," "," "," ","A"
|
" ","O"," "," "," "," ","A"," "," "," ","E"," "," "," "," "," "," "," ","L"," "," "," "," "," ","A"
|
||||||
" ","W"," "," "," "," ","V"
|
" ","W"," "," "," "," ","V"," "," "," ","D"," "," "," "," "," "," "," ","U"," "," "," "," "," ","T"
|
||||||
" ","E"," "," "," "," ","E"
|
" ","E"," "," "," "," ","E"," "," "," "," "," "," "," "," "," "," "," ","E"," "," "," "," "," ","R"
|
||||||
" ","R"," "," "," "," "," "
|
" ","R"," "," "," "," "," "," "," "," ","P"," "," "," "," "," "," "," "," "," "," "," "," "," ","I"
|
||||||
" ","S"," "," "," "," ","F"
|
" ","S"," "," "," "," ","F"," "," "," ","I"," "," "," "," "," "," "," ","P"," "," "," "," "," ","X"
|
||||||
" ","H"," "," "," "," ","U"
|
" ","H"," "," "," "," ","U"," "," "," ","L"," "," "," "," "," "," "," ","I"," "," "," "," "," "," "
|
||||||
" ","E"," "," "," "," ","N"
|
" ","E"," "," "," "," ","N"," "," "," ","L"," "," "," "," "," "," "," ","L"," "," "," "," "," "," "
|
||||||
" ","L"," "," "," "," "," "
|
" ","L"," "," "," "," "," "," "," "," ","?"," "," "," "," "," "," "," ","L"," "," "," "," "," "," "
|
||||||
" ","L"," "," "," "," "," "
|
" ","L"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","?"," "," "," "," "," "," "
|
||||||
" "," "," "," "," "," "," "
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" ","R"," "," "," "," "," "
|
" ","R"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" ","U"," "," "," "," "," "
|
" ","U"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" ","L"," "," "," "," "," "
|
" ","L"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" ","E"," "," "," "," "," "
|
" ","E"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" ","S"," "," "," "," "," "
|
" ","S"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" "," "," "," "," "," "," "
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" "," "," "," "," "," "," "
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" "," "," "," "," "," "," "
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
" "," "," "," "," "," "," "
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
|
||||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -24,7 +24,6 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
|
|||||||
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - locates the geographic position of the given IP address
|
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - locates the geographic position of the given IP address
|
||||||
* [MD5.ps1](Scripts/MD5.ps1) - prints the MD5 checksum of the given file
|
* [MD5.ps1](Scripts/MD5.ps1) - prints the MD5 checksum of the given file
|
||||||
* [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory
|
* [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory
|
||||||
* [matrix-effect.ps1](Scripts/matrix-effect.ps1) - shows the Matrix effect
|
|
||||||
* [moon.ps1](Scripts/moon.ps1) - prints the current moon phase
|
* [moon.ps1](Scripts/moon.ps1) - prints the current moon phase
|
||||||
* [open-browser.ps1](Scripts/open-browser.ps1) - starts the default Web browser
|
* [open-browser.ps1](Scripts/open-browser.ps1) - starts the default Web browser
|
||||||
* [open-email-client.ps1](Scripts/open-browser.ps1) - starts the default email client
|
* [open-email-client.ps1](Scripts/open-browser.ps1) - starts the default email client
|
||||||
@ -38,6 +37,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
|
|||||||
* [send-udp.ps1](Scripts/send-udp.ps1) - sends a UDP datagram message to the given IP address and port
|
* [send-udp.ps1](Scripts/send-udp.ps1) - sends a UDP datagram message to the given IP address and port
|
||||||
* [SHA1.ps1](Scripts/SHA1.ps1) - prints the SHA1 checksum of the given file
|
* [SHA1.ps1](Scripts/SHA1.ps1) - prints the SHA1 checksum of the given file
|
||||||
* [SHA256.ps1](Scripts/SHA256.ps1) - prints the SHA256 checksum of the given file
|
* [SHA256.ps1](Scripts/SHA256.ps1) - prints the SHA256 checksum of the given file
|
||||||
|
* [simulate-matrix.ps1](Scripts/simulate-matrix.ps1) - simulates the Matrix (fun)
|
||||||
* [simulate-presence.ps1](Scripts/simulate-presence.ps1) - simulates the human presence against burglars
|
* [simulate-presence.ps1](Scripts/simulate-presence.ps1) - simulates the human presence against burglars
|
||||||
* [simulate-typewriter.ps1](Scripts/simulate-typewriter.ps1) - prints a message with the typewriter effect
|
* [simulate-typewriter.ps1](Scripts/simulate-typewriter.ps1) - prints a message with the typewriter effect
|
||||||
* [speak-file.ps1](Scripts/speak-file.ps1) - speaks the content of the given text file by text-to-speech (TTS)
|
* [speak-file.ps1](Scripts/speak-file.ps1) - speaks the content of the given text file by text-to-speech (TTS)
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
#!/snap/bin/powershell
|
|
||||||
|
|
||||||
# Syntax: ./matrix-effect.ps1
|
|
||||||
# Description: shows the Matrix effect
|
|
||||||
# Author: Markus Fleschutz
|
|
||||||
# Source: github.com/fleschutz/PowerShell
|
|
||||||
# License: CC0
|
|
||||||
|
|
||||||
try {
|
|
||||||
$PathToData=(get-item $MyInvocation.MyCommand.Path).directory
|
|
||||||
$PathToData="$PathToData/../Data"
|
|
||||||
$Table = import-csv "$PathToData/Matrix.csv"
|
|
||||||
|
|
||||||
Clear-Host
|
|
||||||
foreach($Row in $Table) {
|
|
||||||
Write-Host -nonewline $($Row.A)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host -nonewline $($Row.B)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host -nonewline $($Row.C)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host -nonewline $($Row.D)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host -nonewline $($Row.E)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host -nonewline $($Row.F)
|
|
||||||
Start-Sleep -milliseconds 10
|
|
||||||
Write-Host $($Row.G)
|
|
||||||
Start-Sleep -milliseconds 200
|
|
||||||
}
|
|
||||||
exit 0
|
|
||||||
} catch {
|
|
||||||
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
||||||
exit 1
|
|
||||||
}
|
|
51
Scripts/simulate-matrix.ps1
Executable file
51
Scripts/simulate-matrix.ps1
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/snap/bin/powershell
|
||||||
|
|
||||||
|
# Syntax: ./simulate-matrix.ps1
|
||||||
|
# Description: simulates the Matrix (fun)
|
||||||
|
# Author: Markus Fleschutz
|
||||||
|
# Source: github.com/fleschutz/PowerShell
|
||||||
|
# License: CC0
|
||||||
|
|
||||||
|
try {
|
||||||
|
$PathToData=(get-item $MyInvocation.MyCommand.Path).directory
|
||||||
|
$PathToData="$PathToData/../Data"
|
||||||
|
$Table = import-csv "$PathToData/Matrix.csv"
|
||||||
|
|
||||||
|
Clear-Host
|
||||||
|
foreach($Row in $Table) {
|
||||||
|
for ($i = 0; $i -lt 4; $i++) {
|
||||||
|
Write-Host -nonewline $($Row.A); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.B); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.C); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.D); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.E); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.F); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.G); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.H); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.I); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.J); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.K); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.L); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.M); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.N); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.O); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.P); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.Q); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.R); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.S); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.T); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.U); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.V); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.W); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.X); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.Y); Start-Sleep -milliseconds 5
|
||||||
|
Write-Host -nonewline $($Row.Z); Start-Sleep -milliseconds 5
|
||||||
|
}
|
||||||
|
Write-Host ""
|
||||||
|
Start-Sleep -milliseconds 200
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user