Activity for matthewsnyder
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #289037 |
Post edited: |
— | over 1 year ago |
Edit | Post #289037 | Initial revision | — | over 1 year ago |
Question | — |
How do I set up my own DNS on my LAN, with delegation of public domains? I want to have a local DNS server on my home LAN, say at `192.168.1.123`. All of my machines will use `192.168.1.123` as their only DNS server when connected to my home network. By default, my DNS server will process requests by checking them with a public DNS service on the internet. I am plannin... (more) |
— | over 1 year ago |
Edit | Post #289026 |
Post edited: |
— | over 1 year ago |
Edit | Post #289026 | Initial revision | — | over 1 year ago |
Answer | — |
A: Copy to clipboard from terminal with Vim bindings Vim has multiple "registers", which in modern parlance is multiple internal clipboards. By default, `y`ank sends to an anonymous register, which is separate from the clipboard. However, you can make it send to other registers. The registers `` and `+` in particular are interesting, because they ha... (more) |
— | over 1 year ago |
Edit | Post #289025 | Initial revision | — | over 1 year ago |
Answer | — |
A: Copy to clipboard from terminal with Vim bindings I use kitty as my terminal, which allows you to map a key for copying any text from the screen to the keyboard. The text is selected by pressing some hint keys, similar to the Vimium extension. It's quite flexible but I mostly use "copy line" and "copy word". This just works with clipboard manager... (more) |
— | over 1 year ago |
Comment | Post #288934 |
I consider them whitespace. (more) |
— | over 1 year ago |
Comment | Post #288970 |
@#63646 Evidently, Docker Desktop (which is probably what you would use on windows) supports both: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers Either should work. You should skim the instructions for both and see which one is easier.
I don't have much experience with Doc... (more) |
— | over 1 year ago |
Edit | Post #288970 | Initial revision | — | over 1 year ago |
Answer | — |
A: How to start MariaDB (or MySQL) server on a WSL using systemctl? `systemctl` is a tool for controlling systemd, the "new" Linux init system (actually it's been widely used for 10 years now). Systemd is the first process that runs at boot, which then brings up all the rest of the OS. It also handles various background processes like system services. WSL does not... (more) |
— | over 1 year ago |
Comment | Post #288962 |
It's https://github.com/sharkdp/bat. I assume people would search for something like `bat linux` :)
Yes, the Python code can be improved. But I'm wondering if someone has already written such a program, which is in wide circulation, before I go off maintaining my own. (more) |
— | over 1 year ago |
Edit | Post #288962 | Initial revision | — | over 1 year ago |
Answer | — |
A: Simplest way of stripping leading/trailing whitespace from file or program output I'll post this as an example of what I'm looking to do. The following script: ```python import sys a = sys.stdin.read() b = a.strip() c = map(lambda s: s.strip(), b.splitlines()) for s in c: print(s) ``` Will remove: Whitespace at the beginning and end of the file or stream ... (more) |
— | over 1 year ago |
Edit | Post #288934 |
Post edited: |
— | over 1 year ago |
Edit | Post #288934 |
Post edited: |
— | over 1 year ago |
Edit | Post #288934 | Initial revision | — | over 1 year ago |
Question | — |
Simplest way of stripping leading/trailing whitespace from file or program output What is the simplest shell idiom for stripping leading and trailing whitespace from a file or program output? Ideally I am looking for the equivalent of `trim` or `strip` methods in some languages. The ideal solution should skip empty lines at the beginning and end of the file/stream provide a... (more) |
— | over 1 year ago |
Edit | Post #288933 |
Post edited: |
— | over 1 year ago |
Edit | Post #288933 |
Post edited: |
— | over 1 year ago |
Edit | Post #288933 | Initial revision | — | over 1 year ago |
Answer | — |
A: What unexpected things can happen if a user runs commands expecting a text file on input lacking a file-final newline? I tried to think of some for a while, but couldn't find any good ones. That said, there's plenty of programs I don't know. For reference: ``` $ echo -en "hello\nworld" | tee 1.txt | bat -A ───────┬───────────────────────────────────────── │ STDIN │ Size: - ───────┼──────────────... (more) |
— | over 1 year ago |
Comment | Post #288915 |
>some commenters argued that the original short version was unanswerable because you'd have to check every implementation of every Unix/Linux command
🙄
It sounds like your question would be satisfied with just some general rules of thumb + a few illustrative real world examples, and you're not ... (more) |
— | over 1 year ago |
Comment | Post #288915 |
As a programmer and Unix philosophy adherent, I write many programs, many of them taking textual input on the terminal. I would die of shame if someone ever found a bug in my programs where they break just because of a terminal newline. It would be like taking an IQ test and getting a double digit sc... (more) |
— | over 1 year ago |
Comment | Post #288915 |
This reads a bit like a rant disguised as a question. Superficially, you're asking what problems can happen if you omit the terminal newlines, but really you spend a lot of time explaining how the answer is "nothing, that rule is dumb" (which I agree with, btw). It doesn't really read like a genuine ... (more) |
— | over 1 year ago |
Comment | Post #288915 |
Uh, wait, how does being closed on SX cause it to be verbose? Is it because they nagged the original asker into adding a lot of detail? I think the whole point of this site is that the moderation policy is different than SX, so it might be better to ask the question the way it should have been asked ... (more) |
— | over 1 year ago |
Comment | Post #288913 |
It seems like `pamixer --sink 123 -i 10` works. In my case, looks like the device which gets used as a default sink is not the one I have connected. So the problem with this command is to figure out which sink should be used. (more) |
— | over 1 year ago |
Edit | Post #288913 | Initial revision | — | over 1 year ago |
Question | — |
How do I make media keys work with PipeWire? My keyboard has keys for mute, volume up, volume down. In i3wm, I used to have these bound with: ``` bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +10 --max-volume 100 bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -10 --max-volume 100 ... (more) |
— | over 1 year ago |
Edit | Post #288912 | Initial revision | — | over 1 year ago |
Question | — |
PipeWire separates the audio of every program, how do I combine them? I uninstalled PulseAudio and installed PipeWire. It seems like now, every application gets an independent audio configuration. When I go into pavucontrol I see "Spotify" where I configure the volume and output device that Spotify sends sound to. But if I also open a Youtube video in my browser, th... (more) |
— | over 1 year ago |
Edit | Post #288911 | Initial revision | — | over 1 year ago |
Question | — |
Is PipeWire easier to use than PulseAudio? I have always found PulseAudio to be difficult to use and overcomplicated. Recently I also discovered that it is written by Lennart Poettering, whom I dislike. I am now very motivated to use something else. But configuring sound is also not my passion, I just want sound to work on my computer as I pl... (more) |
— | over 1 year ago |
Edit | Post #288908 | Initial revision | — | over 1 year ago |
Answer | — |
A: How to install mysql-server on Debian? MySQL is not fully open source and maintained by a corporation which was at one time regarded as very evil (there are much worse ones now). Debian is trying to protect you from yourself by not letting you install it. MariaDB is a project developed from forked MySQL code, and designed to be a drop ... (more) |
— | over 1 year ago |
Comment | Post #288849 |
There shouldn't be any future problem. MariaDB was specifically designed to be a drop in replacement for MySQL, in exactly this type of situation. (more) |
— | over 1 year ago |
Comment | Post #288309 |
>break down any one liners into their constituent parts, explaining each of them
This is what I tend to do as well, and yes it is laborious. Instead I suggest that *just breaking down the steps* and linking to the question explaining each step should be considered a sufficient answer. And if the q... (more) |
— | almost 2 years ago |
Comment | Post #288562 |
@#53919 You are right that part of the question stems from a confusion over what's due to missing shell escapes, what's due to missing regex escapes, and what's because of whatever flavor of regex is being used for the sed invocation. Naturally, an answer should address this point as well.
To clar... (more) |
— | almost 2 years ago |
Comment | Post #288562 |
That syntax would actually solve my problem, except that I couldn't get it to work. `b+` is a valid regex meaning "1 or more `b`'s" and the `s/b+/X/` should instruct `sed` to replace each occurence of `b+` with `X`. My input `abc` should therefore be transformed to `aXc`.
But I get:
```
$ echo a... (more) |
— | almost 2 years ago |
Comment | Post #288544 |
Hmm. I assumed there was just a single obvious program that is the culprit. This was a big pacman update, so it's hard to say exactly why it was. I can keep an eye on it in future updates. What exactly would I do with `rmmod`/`modprobe`? Are there any useful keywords to look for in the pacman log? (more) |
— | almost 2 years ago |
Comment | Post #288554 |
Well, between say 1000 small updates that each have 0.1% chance of breakage, and 1 big update that has a 10% chance to break, there's not a huge difference. Both ways break rarely on Arch anyhow.
Normally, whenever I get on my computer, I have several things which are vastly more interesting to do... (more) |
— | almost 2 years ago |
Comment | Post #288554 |
Thanks! I think it's probably better to use `pacman -Sywu` - might as well refresh the repos if we're trying to pull in latest updates.
I did test this and it works. (more) |
— | almost 2 years ago |
Edit | Post #288544 | Initial revision | — | almost 2 years ago |
Question | — |
After update, OpenGL does not work until reboot Whenever I do a big system update, OpenGL stops working until the next reboot. This also prevent OpenGL apps from launching. Example: ``` $ glxgears X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 151 (GLX) Minor opcode ... (more) |
— | almost 2 years ago |
Edit | Post #288543 | Initial revision | — | almost 2 years ago |
Question | — |
Download packages for full system upgrade without installing I noticed that downloading all the pacman packages for a full system install takes a lot of time, so I want to create a systemd time that will periodically download them for me. That way, most of the time the cache will be fresh, and when I actually do update them, most will not need to be re-downloa... (more) |
— | almost 2 years ago |
Edit | Post #288542 | Initial revision | — | almost 2 years ago |
Answer | — |
A: How to debug NetworkManager issue after suspend/resume in Ubuntu 22.04 Although you have left a post saying it is solved, I think it's not uncommon for this kind of problem to show up. I think it can happen due to misconfiguration of either NM or the network drivers/hardware. It would be more useful to have a general troubleshooting question for dealing with NM timeouts... (more) |
— | almost 2 years ago |
Comment | Post #288541 |
I decided to create the tag `quotes` for this, to represent question to do with escaping strings in shells. I think it's a more direct and obvious term than `escaping` for example. Anyhow, I'd love to add a description to the tag, but I couldn't figure out how to do it. (more) |
— | almost 2 years ago |