Hacker Newsnew | past | comments | ask | show | jobs | submit | samhunta's commentslogin

This is a great start. Some lightweight features that would make this even more ideal (for me) would be:

- retina/3x support - support for styled components extend feature (if can be made a lightweight implementation) - maybe default max width of 100% on mobile? - optional ability to overlay an empty full size block so the image cant easily be right clicked and saved


It supports retina/3x. Provide big enough image and it will use it. It takes into account `devicePixelRatio`

> maybe default max width of 100% on mobile?

It is.

> optional ability to overlay an empty full size block so the image cant easily be right clicked and saved

Not sure what you mean, but as soon as image loaded it turns into good old image, so you can do right click


>> optional ability to overlay an empty full size block so the image cant easily be right clicked and saved

> Not sure what you mean, but as soon as image loaded it turns into good old image, so you can do right click

I believe he wants the opposite of that, putting a div over the image so it cannot be right clicked and saved.


Possible deterrents -

1. Use cgroups to limit cpu usage on a process.

2. Block coinhive

3. Implement captchas

4. Cloudflare

5. Adblock

6. API throttling and 1 minute cache per URL

7. Disallow 1 IP from creating more than X accounts at a certain speed per day


Adblock?


If you were using Selenium to generate the screenshots (they weren't, they were using curl) you could add Adblock to the browser being used on your server (Selenium just automates a real browser) which will block Coinhive.


Thanks, I didn't know adblock blocked Coinhive.


The whitepaper works for me. What browser are you using?


Doesn't work for me, I get a beige shade. Maybe I need to calibrate my monitor?


It's blank for me --

0. In Firefox.

1. In Chrome.

2. In a saved pdf, viewed with Preview.app.


Perhaps it's taking the whole whitepaper thing to its logical conclusion.


Yes this is a much better alternative in my opinion.


Please add the OnePlus brand :)


You can select it in More features>Brands>OnePlus ;)


We started using Prettier as a pre-commit git hook and the results have been amazing. There are developers in PRs who will not be comfortable with the eslint settings, have linting turned off or will otherwise ignore linting. Prettier just streamlines so much and you can disable the warnings in eslint that prettier handles automatically. It's insanely useful.


Yes but why represent data this way when HTTP can already handle binary? Does base64 actually compress binary data enough to make these optimized requests? I'm genuinely asking because I have not googled it yet.


Base64 doesn't compress at all, in fact it's only 75% as efficient as binary, meaning that encoding a file into Base64 increases its size by a third.

Base64 uses a 64 character alphabet (hence the name), so you can only represent 64 different values within each byte. 64 == 2^6, so basically you are using 6 bits out of every byte and losing the other 2 bits.

HTTP can use compression to reduce the size of the Base64 representation, but assuming the images were already using a compressed format, all this is going to do is mitigate the inefficiency, it's not going to be more efficient overall.


It's worth noting that for highly-compressible types of files, if you do need to use base64 for some reason it's still more space-efficient to compress first (before base64). If you can compress to 2/3 the size, base64 will only bring it back to the original size again.

This mainly applies when you have to transmit binary data using a text-based format like JSON or XML. I've also used this before to build a shell-script-based installer, where a compressed archive is base64'd in a variable.


No, base64 is normally ~30% larger than binary to represent the same data.


An MBA does not guarantee a good job.


I would love to learn more about machine learning as a web developer, but simply put it's a different industry with entirely different constructs.

I found a great article[1] that at least helped me build a simplistic understanding as a modern developer.

[1]. https://simpleprogrammer.com/2017/10/02/machine-learning-mod...


Also, an actual video of the Roadster in all of it's glory.

https://twitter.com/DavidHodge/status/931391188065705984


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: