Last active
October 3, 2022 00:30
-
-
Save mataha/979d02597aff82a79197f46243e3b0e5 to your computer and use it in GitHub Desktop.
wttr.in in your conhost.exe
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
weather=(powershell -NoProfile -NonInteractive "[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; $place = [uri]::EscapeUriString($(If ([string]::IsNullOrWhiteSpace('$*')) { "${env:WTTR_LOCATION}" } Else { '$*' })); $weather = (Invoke-WebRequest "wttr.in/${place}?mF" -UseBasicParsing -Method 'Get' -UserAgent 'curl').Content; echo `r ${weather}.Replace($([char] 0x2196), $([char] 0x005C)).Replace($([char] 0x2197), $([char] 0x002F)).Replace($([char] 0x2198), $([char] 0x005C)).Replace($([char] 0x2199), $([char] 0x002F)).Replace($([char] 0x26A1).ToString(), $([char] 0x250C).ToString() + $([char] 0x2518).ToString()).Trim();") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment