HNHacker News
TopNewBestAskShowJobs

reegnz

87 karma · joined December 7, 2019

[ my public key: https://keybase.io/reegnz; my proof: https://keybase.io/reegnz/sigs/QRYK6wy7kjNCx-u3PPJy6Dy1J0pborPTqlnmXrN05hk ]
submissionscomments
reegnz··on I've sold out
You can add that via an extension: https://github.com/carderne/pi-sandbox

The price of flexibility is, pi is not opinionated about adding sandboxing out-of-the-box, it gives you options on how you want to do it. You either do it with linux containers, with a dedicated VM, or just bubblewrap. It is nice that it gives you a way to hook into it in a very easy way though.

reegnz··on I've sold out
You can get npm to install into `~/.local`.

Put this into `~/.npmrc`:

```

prefix = ~/.local

```

Bam, `npm install -g` contstrained to your `~/.local`

reegnz··on Bluetooth 6.2 – more responsive, improves security, USB comms, and testing
Bluetooth codecs/profiles do not enforce social norms. And I hope they never will.

EDIT: they also won't get rid of useless meetings where people are not mentally present but do other stuff instead.

reegnz··on Bluetooth 6.2 – more responsive, improves security, USB comms, and testing
To be fair, even with no noise, the HFP has such bad encoding that it doesn't mean much if the room is noisy or not.

Also the sound isolation tech should be orthogonal to using HFP.

reegnz··on Bluetooth 6.2 – more responsive, improves security, USB comms, and testing
The trick I'm using (at least on laptops, cannot do this on phones AFAICT) is to change the input device to the laptop's own microphone to get my earphones to not use HFP (Hands Free Profile) and instead stay in a better quality codec (AAC, LDAC, AptX, SBC, whatever your devices agree upon).

Sound quality for my calls on both sides improved dramatically! Since I've discovered this, I tell all my colleagues in our zoom meetings to switch microphones and it's immediately better for everyone on the call (not just the user that was using HFP).

This is because if you use the hands free profile, it'll use a codec that encodes your voice in a terribly bad bitrate, and even worse, the sound you hear in the headphones is also using a terribly low bitrate.

They should finally fix HFP (Hands Free Profile) spec as it's literally impacting call quality for billions of people.

Edit: apparently LE audio is a thing, but device support is still terrible.

reegnz··on CrowdStrike Update: Windows Bluescreen and Boot Loops
Cybersecurity company secures computers worldwide by not allowing them to be turned on. - not the onion
reegnz··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
Why not just use :grep in vim and navigate the vim quick fix list?
reegnz··on Interactive examples for learning jq
Yeah, I tend to use that one as well, but for me it just feels 'right' as a line editor plugin. I'm running a lot of kubectl commands and for me this plugin proved to be invaluable.
reegnz··on Interactive examples for learning jq
Fixed: https://github.com/reegnz/jq-zsh-plugin/pull/25
reegnz··on Interactive examples for learning jq
Fixed: https://github.com/reegnz/jq-zsh-plugin/pull/25
reegnz··on Interactive examples for learning jq
Thanks for the idea, I've implemented it: https://github.com/reegnz/jq-zsh-plugin/commit/60d3b6fb3ca1b...
reegnz··on Interactive examples for learning jq
> So all I want is a tool to go from json => line oriented and I will do the rest with the vast library of experience I already have at transformations on the command line.*

The tool for that is likely https://github.com/tomnomnom/gron It's probably the best tool to go back and forth easily between json and line oriented.

reegnz··on Interactive examples for learning jq
Nice idea! I'll look into it.
reegnz··on Interactive examples for learning jq
JSONpath and jmespath are objectively worse than the jq language though, as you can only query, but jq also allows for very powerful transformations.

As for learning it, it's the same with any tool, key is repetition and regular use.

reegnz··on Interactive examples for learning jq
Let me drop a link to my jq zsh plug-in: https://github.com/reegnz/jq-zsh-plugin

I find the biggest problem with jq is that the feedback loop is not tight enough. With this jq-repl the expression is evaluated at every keystroke.

reegnz··on No, Okta, senior management, not an errant employee, caused you to get hacked
I find it terribly ironic that a company that provides a service to implement SSO with, has failed to implement SSO for their own support staff.
reegnz··on jq 1.7
Let me drop my jq-zsh-plugin here: https://github.com/reegnz/jq-zsh-plugin

It's a line-editor, and allows me to query json documents ultra-fast. It optimizes for a really fast feedback.

reegnz··on $HOME, not so sweet $HOME
Reminds me of how homebrew on MacOS used to work, it softlinked into the /usr/local prefix.

Nowadays homebrew on arm processors puts everything into /opt/homebrew instead by default...

reegnz··on HashiCorp adopts Business Source License
One man's product is another man's building block.
reegnz··on Build your own Docker with Linux namespaces, cgroups, and chroot
unikernel is not the same as microkernel.

I've found these after some quick googling:

https://unikraft.org/ https://hermitcore.org/ https://nanos.org/

Seems to be a living concept still, just not in the mainstream.

reegnz··on Analyzing multi-gigabyte JSON files locally
Allow me to advertise my zsh jq plugin +jq-repl: https://github.com/reegnz/jq-zsh-plugin

I find that for big datasets choosing the right format is crucial. Using json-lines format + some shell filtering (eg. head, tail to limit the range, egrep or ripgrep for the more trivial filtering) to reduce the dataset to a couple of megabytes, then use that jq-repl of mine to iterate fast on the final jq expression.

I found that the REPL form factor works really well when you don't exactly know what you're digging for.

reegnz··on AutoHotkey v2 Official Release Announcement
On mac I use goku[1] to define custom key bindings for karabiner elements. The ux feels much better than autohotkey, and I wish I had something similar on linux or windows.

[1]https://github.com/yqrashawn/GokuRakuJoudo

reegnz··on All in with Nuitka
Nobody really 'deserves' anything. All things in life have to be earned one way or the other. (for both sides)
reegnz··on RootMyTV is a user-friendly exploit for rooting/jailbreaking LG webOS smart TVs
WOW, SponsorBlock is something I didn't know I needed so bad! Thanks a lot for sharing. (I also pay for yt premium btw)
reegnz··on Oasis: Small statically-linked Linux system
This is painfully reductionist. The mount namespace is only one of multiple namespaces (eg. pid, network, user, etc.) that containers utilize. Security doesn't stop at linking and shipping binaries.
reegnz··on Zero-Day Exploitation of Atlassian Confluence
Mostly Linux-illiterate people, who want to bind to privileged ports (443), and have no idea about systemd sockets[1] and socket-activation[2], so they stick with the first solution that works.

Most people don't know that you can have systemd bind to the privileged ports for you, and hand over the fd to the port to your (unprivileged) process.

Same goes for docker/containerd btw, if you run docker as root nowadays, you are doing it wrong.

[1] https://www.freedesktop.org/software/systemd/man/systemd.soc... [2] https://www.freedesktop.org/software/systemd/man/systemd-soc...

reegnz··on Git security vulnerability announced
I beg to disagree. I like my https://direnv.net/

As long as it's strictly opt-in, it's fine. But it needs to be opt-in to be secure.

reegnz··on Go 1.18
Policies do work if you have a process to enforce those policies. Without policy how do you define the process? "Good intentions never work, you need good mechanisms to make anything happen." http://nickfoy.com/blog/2018/4/7/good-intentions-dont-work
reegnz··on Kakoune Code Editor
Don't get me wrong, I'm a nvim + LSP + treesitter user. :)
reegnz··on Kakoune Code Editor
You don't need multi-cursor selection in vim.

Vim has all the tools necessary to achieve the same end result with the same convenience. [0]

Just thinking about what crazy things I've done with macros that multi-cursor would be incapable of handling makes me chuckle.

vim doesn't need the fancy features of other editors (except for maybe LSP and tree-sitter for a more IDE-like experience).

The core problem is that you don't grok vi [1] which is fine, not everyone has time and passion for that. But please don't think for a moment that vim is inferior just because it doesn't blindly copy other editors features.

[0] https://engagor.github.io/blog/2018/02/21/why-vim-doesnt-nee... [1] https://stackoverflow.com/a/1220118

Page 1 of 2Next →