Skip to content

Instantly share code, notes, and snippets.

@wboevink
wboevink / portview.ps1
Created March 30, 2017 14:26
What's running on port ...
$proc = @{};
Get-Process | ForEach-Object { $proc.Add($_.Id, $_) };
netstat -aon | Select-String "\s*([^\s]+)\s+([^\s]+):([^\s]+)\s+([^\s]+):([^\s]+)\s+([^\s]+)?\s+([^\s]+)" | ForEach-Object {
$g = $_.Matches[0].Groups;
New-Object PSObject |
Add-Member @{ Protocol = $g[1].Value } -PassThru |
Add-Member @{ LocalAddress = $g[2].Value } -PassThru |
Add-Member @{ LocalPort = [int]$g[3].Value } -PassThru |
Add-Member @{ RemoteAddress = $g[4].Value } -PassThru |
Add-Member @{ RemotePort = $g[5].Value } -PassThru |
@wboevink
wboevink / UploadMultipleBlobs.cs
Created March 29, 2017 12:49 — forked from tuan/UploadMultipleBlobs.cs
A test console app to upload multiple blobs to Azure Blob Storage in parallel
class Program
{
static void Main(string[] args)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
UploadToBlobAsync().Wait();
stopwatch.Stop();
Debug.WriteLine("Elapsed time in seconds: " + stopwatch.ElapsedMilliseconds / 1000);
}