Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 8y ago · link · parent

So I finally found the answer. Thanks.

comment 8y ago · link · parent

How does one properly quote an argument for a command that can contain spaces?

For example:

    parent_dir = "$(basename $dir)"
How to quote $dir here? What if it contains spaces or other special characters?

That's what I dislike about Bash.

Also, always start your scripts with

    set -e
This prevents script from running after error, without any messages though.

Also, I always make mistakes when using [ and [[.

comment 8y ago · link · parent

Shouldn't "hacking back" be extended to companies that collect user's data without obtaining their consent properly, without respecting privacy and local customs like Google, Cambridge Analytics, or Facebook do?

comment 8y ago · link · parent

Without zoning you will get a landscape like in Moscow suburbs [1][2]. That is what "affordable" (in fact not very affordable) housing looks like.

[1] https://cs7.pikabu.ru/post_img/big/2017/11/15/4/151072205515...

[2] https://varlamov.me/2017/nekrasovka/02.jpg

comment 8y ago · link · parent

Docker was never made for security, only for isolation and it can have vulnerabilities.

comment 8y ago · link · parent

In a typical linux distro all apps are run under the same user which means they can do whatever they want to each other and user's files. So X server being secure or not doesn't really change anything.

By the way Android, unlike Linux, runs every app under a different user account.

comment 8y ago · link · parent

Not necessary. Larger assets take more time to read from disk.

comment 8y ago · link · parent

Russia was allegedly buying pro-LGBT ads? Surprising.

Also there are several posts with russian text on the picture like this one [1].

But this doesn't look like a state-level operation. A single person could easily make all those pictures.

[1] https://www.documentingreality.com/forum/russian-ads/2015-Q2...

comment 8y ago · link · parent

Several years ago MS released a new, "RT" version of app for Windows. One of the differences is that it doesn't even have an option to disable updates. So if Microsoft decides to add more ads or integrate more Facebook pages or make the app even less usable, you cannot opt out of that.

By the way, I hate updates. Today I updated Sublime Text and the background of code changed from light grey to white, making it harder to read. And they removed all bright themes (including Dawn), leaving only dark ones with poor contrast.

comment 8y ago · link · parent

It might be a revolution if people previously had better living conditions. But for country like China it probably looks like a big success and people want stability and not changes.

comment 8y ago · link · parent

Adding an interrupt delay is also not free and requires changes on hardware level. But if it was done in 80s then of course it was a safe hack because there was no kernel and user mode isolation at that time.

comment 8y ago · link · parent

> To fix this, the CPU has a wild card: When you change SS, you get exactly 1 instruction that will not be interrupted. The idea is you use that instruction to change (e/r)SP and make the stack valid again. If there is a need for an interrupt, it will be delayed for 1 instruction.

I wonder, why could not they make a single instruction to change both SS and SP?

comment 8y ago · link · parent

Virtual Machine will probably mean poor performance for GUI apps, especially HTML-based apps. Why don't they just use containers?

comment 8y ago · link · parent

The web works much better without JS, sites load faster and browser takes less memory. But sadly many sites use preloaders or plugins that hide entire page content until JS is loaded. What an awful idea.

comment 8y ago · link · parent

But this could help against reckless and irresponsible people.

comment 8y ago · link · parent

If your hammer can fly then probably yes. Are you against license plates on cars too?

comment 8y ago · link · parent

Drones must be regulated because people are irresponsible. Sometimes I see photos taken from a drone hanging above the people. What if it falls down?

Therefore, drones need identification. There must be a number on it and there must be a law forbidding to operate a drone without number.

comment 8y ago · link · parent

But if you use PDF viewer in Chrome, it is properly sandboxed from the rest of OS. Is this app sandboxed as well? I don't think so.

comment 8y ago · link · parent

Also you cannot store foreign keys in JSON.

comment 8y ago · link · parent

Cannot it add FK constraints after the ghost table is fully populated?

comment 8y ago · link · parent

I've tested, it works awesomely. But does it mean that anyone who got temporary access to your DNS can issue certificates and MITM your traffic? It should not be this way.

comment 8y ago · link · parent

People who think that they have nothing to hide should publish their emails and chat logs online. Don't worry, I won't read them and any decent person won't.

comment 8y ago · link · parent

Just replace deleted user's data with "Mr. Deleted 1234, 1234@deleted.com".

comment 8y ago · link · parent

> not sharing data with people you don't trust

That means basically don't share them with anyone, don't sign any contracts, don't work and live in the street. Because even your employer or real estate agent can sell them to anyone else in your model.

comment 8y ago · link · parent

What if we make companies behave responsibly instead? There are less companies than people, and it is easier to go after them.

If I owned a site I would not have a problem to delete someone's personal data.

Also your sugguestion is that if you want to keep your data protected then you should not be using anything on the Internet or make any deals because once you have ordered something on Amazon it can sell your data to everyone else? Or when you rent an apartment, realty agency should be allowed to share your name, SSN, bank card number and address with everyone? No, I don't think it should be this way.

comment 8y ago · link · parent

> once shared, are no longer under my control

GDPR attempts to fix that.

comment 8y ago · link · parent

Please see this comment for a possible solution: https://news.ycombinator.com/item?id=16964318

comment 8y ago · link · parent

The best would be to encrypt IP addresses with a key that is regenerated every week. This way you can identify unique visitors over a week but cannot restore their IP address. I hope it will be the default option for popular web server software.

comment 8y ago · link · parent

You don't have to keep IP addresses in the log. You could encrypt them with a key that is regenerated every week for example. This way you can identify requests from the same visitor over a week but you cannot restore their IP address.

I think that soon there will be extensions for popular servers that implement something like this. I wish it were the default configuration.

Also I think if IPSs rotated IP addresses among their customers daily it would not be a problem at all.

comment 8y ago · link · parent

Any identifier can be a "personal data" only if it allows to link it to some real person. If you don't store IP address, email, real name, ID card number, SSN, bank card number, phone number, then user id is just a number.

Quote [1]:

> ‘personal data’ means any information relating to an identified or identifiable natural person (‘data subject’);

[1] https://gdpr-info.eu/art-4-gdpr/

1
154155156
185