This file contains 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
$results = echo (0..2) -pipelinevariable second | % { | |
echo (0..10) -pipelinevariable third | % { | |
echo (0..254) -pipelinevariable fourth | % { | |
$status = Test-NetConnection -CommonTCPPort HTTP "10.$second.$third.$_" | |
if ($status.TcpTestSucceeded) { |
This file contains 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
del outfile*.txt -ea 0 | |
$fn = 0 | |
gc file.txt | | |
% { | |
if ($_ -eq '-----BEGIN CERTIFICATE-----') | |
{ | |
$fn++ | |
$fname = 'outfile'+$fn+'.txt' | |
$fname | |
} |
This file contains 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
######################################################################################################## | |
# | |
# .SYNOPSIS | |
# | |
# PowerShell function that returns the file encoding name as a string. | |
# | |
# _____ _ ______ _ _ ______ _ _ | |
# / ____| | | ____(_) | | ____| | (_) | |
# | (___ | |__ _____ ______| |__ _| | ___| |__ _ __ ___ ___ __| |_ _ __ __ _ | |
# \___ \| '_ \ / _ \ \ /\ / /____| __| | | |/ _ \ __| | '_ \ / __/ _ \ / _` | | '_ \ / _` | |
This file contains 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
################################################################ | |
# | |
# .SYNOPSIS | |
# | |
# PowerShell function named "ConvertFrom-CsvToFixedWidth" | |
# | |
# _____ _ ______ | |
# / ____| | | | ____| | |
# | | ___ _ ____ _____ _ __| |_| |__ _ __ ___ _ __ ___ | |
# | | / _ \| _ \ \ / / _ \ __| __| __| __/ _ \| _ _ \ |
This file contains 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
function Logs | |
{ | |
$lineNumber = 0 | |
$delimiter = ":" | |
$dateTimeStamp = "00-00-0000 00:00:00.000" | |
Get-ChildItem Log?.txt | | |
ForEach-Object { | |
$filename = $_.name | |
Get-Content $filename | ForEach-Object { | |
if ([System.Console]::KeyAvailable) { return } # <-- this makes it interruptable |
This file contains 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
------------------------------------------------------------------------------------------------ | |
output redirection to Unicode text where | |
α is a command | |
ß and γ are file names or PowerShell variable names | |
α > ß only regular output - override | |
α >> ß only regular output - append | |
α 2> ß only error output - override | |
α 2>> ß only error output - append | |
α 2>&1> ß both regular output and error output, merged - overide | |
α 2>&1>> ß both regular output and error output, merged - append |
This file contains 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
<!DOCTYPE html> | |
<html lang="en" ng-app="RSSFeedApp" ng-strict-di> | |
<head> | |
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>RSS Feed Reader (demo of an AngularJS 1.4.0 SPA using Bootstrap 3.3.4 CSS)</title> | |
<!-- based on http://www.ivivelabs.com/blog/making-a-quick-rss-feed-reader-using-angularjs/ --> | |
<!-- see: https://developers.google.com/feed/v1/jsondevguide for the service used in RSSFeedFactory --> |
This file contains 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
output redirection where α is a command and ß and γ are filenames | |
------------------------------------------------------------------ | |
α > ß only regular output - override | |
α >> ß only regular output - append | |
α 2> ß only error output - override | |
α 2>> ß only error output - append | |
α 2>&1> ß both regular output and error output, merged - overide | |
α 2>&1>> ß both regular output and error output, merged - append | |
α >ß 2>γ both regular output and error output, separately - both override | |
α >>ß 2>>γ both regular output and error output, separately - both append |