Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for matthewsnyder‭

Type On... Excerpt Status Date
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)
over 1 year 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)
over 1 year 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)
over 1 year 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)
over 1 year 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)
over 1 year 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)
over 1 year ago
Edit Post #288544 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288543 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288542 Initial revision over 1 year 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)
over 1 year 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)
over 1 year ago
Edit Post #288541 Initial revision over 1 year ago
Question Can I enter raw strings in fish to avoid escaping regexes for sed?
When running `sed` through `fish`, I often encounter a problem with regexes. Many commonly used regex control characters like `[]{}().+` need to be escaped, even if I type the regex in a single quoted string. For example: ``` $ echo abc | sed 's/b+/X/' abc $ echo abc | sed 's/b\+/X/' aXc ``...
(more)
over 1 year ago
Comment Post #288318 That's a good idea - I'll give it a try next time I run into this. With `bwrap`, it is indeed possible to capture diagnostics both inside and outside. Outside will include the activity of bwrap itself on top of what the program inside does. Both might be interesting in this case.
(more)
over 1 year ago
Comment Post #288318 @#58118 Interesting - I'm not sure if that's true, but it would certainly explain it if so. Any idea on how I can confirm it?
(more)
over 1 year ago
Comment Post #288436 Usually "number of cores" is a good starting value for `n`.
(more)
over 1 year ago
Edit Post #288316 Post edited:
over 1 year ago
Comment Post #288332 I know you said you want to avoid a reinstall, but actually it wouldn't be too hard to do. You would: 1. Backup the `/home` somewhere (easier if `/home` is its own partition) 2. Get list of all explicitly installed packages from apt 3. Wipe everything else 4. Install fresh Debian with same user...
(more)
over 1 year ago
Comment Post #288332 It's been a while since I used Debian, but what if you simply: * Ask `apt` to export a list of packages that came from unstable (you want to make sure that you ask for those explicitly requested, and not just dependencies) * Uninstall them all (and their dependencies) * Remove `unstable` from `/...
(more)
over 1 year ago
Edit Post #288311 Post edited:
over 1 year ago
Edit Post #288401 Post edited:
over 1 year ago