Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hddqsb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
211.
▲
by
hddqsb
5y ago
One place where singleton tuples used to be common is with the old "%"-formatting, specifically in the case where there is a single argument and its value might be a tuple: x = (1,2,3) #print("the value of x is %s&q
212.
▲
by
hddqsb
5y ago
[Edit: The gibberish sentence "A variation moving up is also allowed." was meant to say "A variation of this solution can be used to solve the case where moving up is also allowed."]
213.
▲
by
hddqsb
5y ago
There is a mistake in the article's statement of the problem. It says > the possible moves are going right, down or up by one but the actual problem ( https://adventofcode.com/2021/day/15 ) allows moving i
214.
▲
by
hddqsb
5y ago
The unmount was just for verification. The tool is clearly intended to be used without unmounting the disk at any point. Repeatedly copying until there are no new changes would produce a consistent image (if it terminates -- it requires the
215.
▲
by
hddqsb
5y ago
Except that's not how this tool works. It only does a single pass over the modified blocks as far as I can tell.[1][2] [1] https://github.com/benjojo/hot-clone/blob/6a019efe28bdbbeeb1... [2] https:/
216.
▲
by
hddqsb
5y ago
I believe the reason they are called "gaping security holes" is that if nc is installed as setuid root, they allow local privilege escalation (see https://serverfault.com/questions/237584/netcat-e-the-gap
217.
▲
by
hddqsb
5y ago
Nope, try it out: $ printf 'banana\ngrep banana\n' | grep banana | grep -v grep banana $ echo $? 0 $ printf 'grep banana\n' | grep banana | grep -v grep $ echo $? 1 To clarify my previous comment, `gre
218.
▲
by
hddqsb
5y ago
That's a valid concern, but in this case it won't cause problems -- grep exits with 0 if a line was selected; in the case of `grep -v grep` that means there was a line without "grep", which is what we want. (Also @thewak
219.
▲
by
hddqsb
5y ago
pgrep is great, but note that you can still encounter this problem if you run pgrep in parallel -- it will never match its own process, but it will match other pgrep processes. So for example if you have a script that uses `pgrep -f ban
220.
▲
by
hddqsb
5y ago
That won't work because sshd runs the command using the user's login shell. From https://man.openbsd.org/sshd#LOGIN_PROCESS : > When a user successfully logs in, sshd does the following: > ... > 9. Ru
221.
▲
by
hddqsb
6y ago
For some reason I thought this was a standard feature of tar, and was surprised when it didn't work. It turns out that GNU tar supports extraction of concatenated tarballs, but it requires the --ignore-zeros (-i) option: > Normally,
222.
▲
by
hddqsb
7y ago
I love GitLab, and Pages access control is a great feature, but I think this was rolled out very poorly. <rant> The access level is "Only Project Members" by default for private projects, which I consider a breaking change b
223.
▲
by
hddqsb
7y ago
That's what it does. It's not that new, it's been live since Sept 27 ( https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues... ).
224.
▲
by
hddqsb
7y ago
> Maybe a keybinding can be added to enable/disable "smart" completion (leaving only simple filepath completion). Seems like it should be a relatively quick configuration fix. There is a keybinding to do simple filename co