Live data from Hacker News

Curl Wttr.in

github.com

91–100 of 128 posts

Re: Curl Wttr.in

#91

Earlier quoted context omitted.

No need for that. You can do this: (Invoke-WebRequest -Uri wttr.in).content from Powershell. Why not use the happy path?

Serious question -- not a flame war :) I honestly can't tell if this is sarcastic or not. I've been typing `curl -O http: ...` into command prompts for decades, and that Powershell incantation looks awfully unwieldy. In what way is it the happy path?

Because it's the native Windows answer. There's no need to make Windows look like Unix. It's great (really!) the way it was designed.

Re: Curl Wttr.in

#92
post #86

Earlier quoted context omitted.

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

Wow! That's cool. Let's try it

  curl() { [ -t 1 ] && curl "$@" | sanitize || curl "$@"; }

Re: Curl Wttr.in

#93
post #86

Earlier quoted context omitted.

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

Yes it works! The difference is minimal though (it was intentionally a one-liner)

Re: Curl Wttr.in

#94
post #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

curl wttr.in/:help

and the curlable directory is almost there

As an interim solution, you can use this:

  curl https://raw.githubusercontent.com/chubin/awesome-console-services/master/README.md

Re: Curl Wttr.in

#95
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

I hoe it is listed at https://github.com/chubin/awesome-console-services

Re: Curl Wttr.in

#96
post #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)

That's because Windows Terminal is not the standard Windows console. :P

Re: Curl Wttr.in

#97
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…

Also very useful:

curl ifconfig.co (shows your public ip)

Re: Curl Wttr.in

#98
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…

Also very useful: curl ifconfig.co (shows your public ip)

I used to use this a lot, but when I tried yesterday (and same today) I got a Heroku error message :(

Not sure if it's temporary down or fully off.

Re: Curl Wttr.in

#99
post #98

Earlier quoted context omitted.

Also very useful: curl ifconfig.co (shows your public ip)

I used to use this a lot, but when I tried yesterday (and same today) I got a Heroku error message :( Not sure if it's temporary down or fully off.

I get that occasionally too...not sure why, but if you spam it it usually works after 3-4 attempts.

Re: Curl Wttr.in

#100
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…

Also very useful: curl ifconfig.co (shows your public ip)

I just use an alias

   myip is aliased to `dig +short myip.opendns.com @resolver1.opendns.com'
Post reply on HN