Skip to content

Instantly share code, notes, and snippets.

View yorgabr's full-sized avatar

Márcio Siqueira yorgabr

View GitHub Profile
@yorgabr
yorgabr / fastest_cygwin_mirror.ps1
Last active December 12, 2017 17:48
Use this small script to come across the fastest Cygwin Setup mirror for your location.
function purge-any-pending-job {Get-Job | Remove-Job}
$measure_mirror_latency = {
Param([string] $argument)
$mirror_url = ($argument -split ";")[0]
$sum_url = "$($mirror_url)x86_64/sha512.sum"
$req = [System.Net.WebRequest]::Create($sum_url)
$req.Timeout = 2000
try {
$dur = (Measure-Command {