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 ShadowsRanger‭

Type On... Excerpt Status Date
Edit Post #295839 Post edited:
6 months ago
Edit Post #295839 Initial revision 6 months ago
Question How to programmatically determine which zsh startup file to set `ZDOTDIR` and `XDG_CONFIG_HOME`?
I want to configure zsh to read its config from `/.config/zsh` by setting `ZDOTDIR=$XDGCONFIGHOME/zsh` and ensuring `XDGCONFIGHOME` is defined early. Currently my script appends exports to three global files (`/etc/profile`, `/etc/zshenv`, `/etc/zsh/zshenv`) if I have sudo, otherwise symlinks `/....
(more)
6 months ago
Edit Post #294908 Post edited:
11 months ago
Edit Post #294908 Post edited:
11 months ago
Edit Post #294908 Post edited:
11 months ago
Edit Post #294908 Initial revision 11 months ago
Answer A: Remove last N lines from a text file in Linux
Use `head` to keep all but the last N lines, overwriting the file: ```bash head -n -N input.txt > tmp && mv tmp input.txt ``` Example: remove last 3 lines ```bash head -n -3 file.txt > tmp && mv tmp file.txt ``` If you want in-place editing without a temp file. The command ```b...
(more)
11 months ago
Edit Post #294907 Initial revision 11 months ago
Question Remove last N lines from a text file in Linux
How can I delete a specific number of lines from the end of a text file using Linux command-line tools?
(more)
11 months ago
Edit Post #294834 Post edited:
11 months ago
Edit Post #294834 Initial revision 11 months ago
Question Why is Helix auto-formatting my CSS files on save?
Hi everyone, I recently set up Helix and noticed that every time I save a CSS file, it gets automatically formatted. I didn’t enable any formatter for CSS in my configuration, only for Python. My `languages.toml` looks like this: ```toml [[language]] name = "python" language-servers = ["...
(more)
11 months ago
Edit Post #294725 Initial revision 11 months ago
Answer A: How can we grow this community?
There could be Lemmy communities that automatically repost Codidact category RSS feeds to increase reach. Host them on bot-friendly instances such as ibbit.at, or run a dedicated Lemmy instance for Codidact. Links back to the original Codidact posts would likely increase reach and participation. ...
(more)
11 months ago
Edit Post #294361 Post edited:
about 1 year ago
Edit Post #294361 Post edited:
about 1 year ago
Edit Post #294361 Initial revision about 1 year ago
Answer A: How can I print both "before" and "after" filenames when batch-renaming files?
```sh perl-rename -nv 'regex' / ``` Breakdown: - -n: Dry run—no files are actually renamed; it only shows what would happen. - -v: Verbose—prints each renaming operation. - 'regex': Your Perl regex describing how names should change. - `/`: Expands to all files in the current directory a...
(more)
about 1 year ago
Edit Post #294360 Post edited:
about 1 year ago
Edit Post #294360 Post edited:
about 1 year ago
Edit Post #294360 Initial revision about 1 year ago
Question How can I print both "before" and "after" filenames when batch-renaming files?
I'm trying to bulk-rename files in a directory and its subdirectories. I want to print each file's name before and after renaming, ideally on the same line in the form: ``` originalfilename -> newfilename ``` Right now, my command is: ``` find . -type f -print -exec perl-rename -n 're...
(more)
about 1 year ago
Edit Post #292753 Post edited:
almost 2 years ago
Edit Post #292753 Initial revision almost 2 years ago
Question How can I efficiently create a collage of video thumbnails on Linux?
I want to create a collage of 20 screenshots from a video, arranged in a 5x4 grid, regardless of the video’s length. How can I do this efficiently on a Linux system? Specifically, I’d like a way to automatically generate this collage of 20 thumbnails from the video, without having to manually ...
(more)
almost 2 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Post edited:
almost 3 years ago
Edit Post #289772 Initial revision almost 3 years ago
Question How to identify and separate standalone applications from libraries in Linux package lists?
I want to generate a list of trending Arch/AUR packages that focuses on user-facing applications rather than background libraries and dependencies. I wrote a script that uses the data from pkgstats to show packages sorted by popularity. However, it doesn't distinguish between applications and ...
(more)
almost 3 years ago
Edit Post #289008 Post edited:
about 3 years ago
Edit Post #289008 Post edited:
about 3 years ago
Edit Post #289008 Post edited:
about 3 years ago
Edit Post #289008 Initial revision about 3 years ago
Question Getting a Module Error When Running Pytest Even Though the Module is Installed in the Current Virtual Environment
Hello everyone, I am encountering an issue when running pytest in my virtual environment. Although I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package ...
(more)
about 3 years ago
Edit Post #287901 Post edited:
over 3 years ago
Edit Post #287901 Post edited:
over 3 years ago
Edit Post #287901 Post edited:
over 3 years ago
Edit Post #287901 Initial revision over 3 years ago
Question How to automatically change to the first matching directory using fuzzy search and cd?
I want the `cd` command to automatically change to the first directory that matches a fuzzy search, without prompting me to select between multiple options. This is what I've tried: ```bash cd() { local dir="$1" local selecteddir selecteddir=$(find . -depth 1 -type d 2>/dev/...
(more)
over 3 years ago
Edit Post #287714 Post edited:
over 3 years ago