Live data from Hacker News

Show HN: Curl https://ec2.shop

ec2.shop

11–20 of 84 posts

Re: Show HN: Curl https://ec2.shop

#14

From time to time, I want a quick tool to help me compare EC2 instances price. https://ec2instances.info/ works great but it's somewhat slow and didn't have a way to just `curl` from terminal. So I develop this small tool which you can do thing like curl https://ec2.shop curl https://ec2.shop?region=us-west-2&filter=t2,m4

Useful tool!

Do you not need to escape the ampersand in the second example? otherwise bash will run it in the background and skip the `filters=t2,m4` part.

Re: Show HN: Curl https://ec2.shop

#15
post #9
post #7

Earlier quoted context omitted.

For HTTPS to truly be meaningful we need to stop supporting HTTP as an on-ramp, to prevent people from just hijacking that initial unencrypted connection and sending anything they want.

If you MITM and the user agent send an HTTP request for ec2.shop it does not matter whether the webserver supports HTTP or not, you can send a fake HTTP response either way.

That was the GPs point.

Re: Show HN: Curl https://ec2.shop

#17
post #7

Earlier quoted context omitted.

For HTTPS to truly be meaningful we need to stop supporting HTTP as an on-ramp, to prevent people from just hijacking that initial unencrypted connection and sending anything they want.

Anyone who likes to prevent that can submit their site to the HSTS preload list. Chrome, Firefox and Edge use a shared one, the only two relevant other agents (Safari and curl) unfortunately don't though.

This is about curl though.

Re: Show HN: Curl https://ec2.shop

#19
post #12

Color output seems to be tuned for dark terminal backgrounds. Memory, vCPUs, and Storage are nearly unreadable on a white background.

I've moaned about this with other CLI tools as well. I wish trend of using RGB values in ANSI escape codes would die because as ugly as the 16*3 colour fields¹ are, they are at least customisable so people can use palettes that suite their terminal and eyesight.

You don't get any such opportunity if the developers hard code the colour values in (and it's worse with a tool like this because you can't even set an environmental variable to change the tools behaviour)

¹ sixteen colours plus bright and dark variants

Re: Show HN: Curl https://ec2.shop

#20

From time to time, I want a quick tool to help me compare EC2 instances price. https://ec2instances.info/ works great but it's somewhat slow and didn't have a way to just `curl` from terminal. So I develop this small tool which you can do thing like curl https://ec2.shop curl https://ec2.shop?region=us-west-2&filter=t2,m4

Are you manually detecting Curl specifically? If I use anything other than Curl, e.g. HTTPie or wget, I get the HTML page, even if I provide an `Accept: text/plain` request header. If I use one of those tools and spoof the Curl user agent string, I get the text/plain response. You should probably just look at the Accept request header, it’s there specifically so clients can tell you what kind of response they want.
Post reply on HN