Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hddqsb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
hddqsb
3y ago
Nice, thanks for sharing. Not directly related, but since you mentioned s_client, please see my warning regarding its security: https://news.ycombinator.com/item?id=36179850#36186559
62.
▲
by
hddqsb
3y ago
See my warning regarding s_client and security: https://news.ycombinator.com/item?id=36179850#36186559
63.
▲
by
hddqsb
3y ago
But see my warning regarding security: https://news.ycombinator.com/item?id=36179850#36186559
64.
▲
by
hddqsb
3y ago
Obligatory: Telnet is better than netcat for interactive logins, but SSH is even better than Telnet for that . So don't use Telnet.
65.
▲
by
hddqsb
3y ago
In fact OpenSSH has already done so! https://www.openssh.com/txt/release-9.0
66.
▲
by
hddqsb
3y ago
The advice "never use telnet" is fine. Yes, technically there are ways to use telnet safely (e.g. over WireGuard or a LAN), but they are fragile and I think it's better not to mention them. Take the version in your comment fo
67.
▲
by
hddqsb
3y ago
**WARNING:** `openssl s_client` is designed only as a diagnostic tool and is NOT suitable if you care even slightly about security. By default it continues on verification failures so you get absolutely zero security. You must specify
68.
▲
by
hddqsb
3y ago
There is a discussion with some insight into the technical reasons why they don't support Windows 7: https://discuss.python.org/t/windows-7-support-for-python-3-... (summary: api-ms-win-core-path-l1-1-0.dll is not
69.
▲
by
hddqsb
3y ago
It wasn't Sergey who did the skydiving, but still a cool demo: https://www.youtube.com/watch?v=hxmbbtuRszA
70.
▲
by
hddqsb
3y ago
Here is an example I linked in another comment: http://www.dest-unreach.org/socat/doc/socat-gender.txt
71.
▲
by
hddqsb
3y ago
As another commenter says, you can use socat. Specifically, you can run it in double client mode (see http://www.dest-unreach.org/socat/doc/socat-gender.txt ) to connect the UNIX socket to the service.
72.
▲
by
hddqsb
3y ago
Note that a trailing slash means to copy the contents when using rsync , but not when using cp (which will copy the directory even if there is a trailing slash). For cp, the correct way to copy only the contents is to use `cp -r foo/
73.
▲
by
hddqsb
3y ago
I think you have to visit https://github.com/search , type a query (use /.../ for a regex, and repo:... to filter by repo), then click "Code" in the left navigation bar (and sign in). The search box on pr
74.
▲
by
hddqsb
3y ago
Bash has PROMPT_DIRTRIM to only print the last n components (this effect can also be achieved using zsh: https://unix.stackexchange.com/questions/273529/shorten-path... ).
75.
▲
by
hddqsb
3y ago
And "auto" only added in 2018 ( https://git.kernel.org/pub/scm/network/iproute2/iproute2.git... ).
76.
▲
by
hddqsb
3y ago
Edit: That should have been `[ "${myvar+set}" = "set" ]` for checking that `myvar` is set.
77.
▲
by
hddqsb
3y ago
Oops, quite right -- the glob pattern for matching any letter is `[[:alpha:]]`, not `[:alpha:]`. Cheers!
78.
▲
by
hddqsb
3y ago
TL;DR: https://en.wikipedia.org/wiki/Prisoner's_dilemma https://en.wikipedia.org/wiki/Tit_for_tat
79.
▲
by
hddqsb
3y ago
> I can't see why the error you describe would occur in this instance. Would you mind explaining? Sure, it's due to pathname expansion. The most commonly used pattern is `*` (e.g. `echo *.txt` might expand to `echo foo.txt bar.
80.
▲
by
hddqsb
3y ago
I believe that's the point! (Would probably be more user-friendly if it sent a RST instead of silently dropping the connection and letting it time out.)
81.
▲
by
hddqsb
3y ago
(`local` is not in POSIX, I know)
82.
▲
by
hddqsb
3y ago
Beware, I would not trust ChatGPT to produce safe scripts. At minimum, consider using ShellCheck on the result to detect common mistakes such as not quoting variables. Writing safe scripts is very hard.
83.
▲
by
hddqsb
3y ago
In fact `${foo+some_string}` is supported by POSIX sh (unlike `test -v`).
84.
▲
by
hddqsb
3y ago
Note that `test -v` is not in POSIX sh (see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/t... ). And you don't need `builtin` because `test ...` invokes the builtin by default; if you want t
85.
▲
by
hddqsb
3y ago
Actually, the function returns success if the input contains "." and printf succeeds, so it does not consider 2e3 to be a float. I agree that this function is odd (it's not even useful for identifying simple numbers of th
86.
▲
by
hddqsb
3y ago
Yes. printf is not a "flex", it's the only safe way to display arbitrary strings. The link mentions one good reason to avoid echo (string might be "-n"), but another important reason is that the behaviour of echo is
87.
▲
by
hddqsb
3y ago
Your "zsh/bash" code doesn't actually use any zsh/bash-only features, so it is compatible with POSIX sh. But you have a quoting bug: you should escape the `$` in `$2` and `${3...}` to protect from double-eval. I
88.
▲
by
hddqsb
3y ago
Note that this is supported by bash/zsh/ksh but not by POSIX sh.
89.
▲
by
hddqsb
3y ago
Some feedback: There are several ambiguities in the "pudding" challenge. - Unclear if offenders are defined as taking >2 puddings or >=2 puddings (conflicting wording; note that the placeholder comment also refers to this, a
90.
▲
by
hddqsb
4y ago
Google's response said that their software does not depend on the vulnerable packages (this is consistent with the researcher only seeing downloads from dev machines and not from automated builds). Reading between the lines, I'm g
More ›