This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-WindowsFeature -name Telnet-Client | |
# or | |
dism /online /Enable-Feature /FeatureName:TelnetClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encode | |
$Text = "Hidden secret!" | |
$Bytes = [System.Text.Encoding]::Unicode.GetBytes($Text) # or Unicode.GetBytes($Text), if Unicode is not needed | |
$EncodedText =[Convert]::ToBase64String($Bytes) | |
$EncodedText | |
# decode | |
$EncodedText = “SABpAGQAZABlAG4AIABzAGUAYwByAGUAdAAhAA==” | |
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText)) | |
$DecodedText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Realtime lines per second in a log file | |
tail -f /var/log/logfile | perl -e 'while (<>) {$l++;if (time > $e) {$e=time;print "$l\n";$l=0}}' |
OlderNewer