harsh3466

joined 1 year ago
[–] [email protected] 5 points 1 hour ago

Hahaha. Was about to comment nearly the same thing. My NFS share has a different mount. ~/Documents is an empty directory

[–] [email protected] 1 points 3 hours ago

That sounds line it might be a paella, which is a spanish dish. Try looking up recipes for paella and see if that sounds like what you're after.

[–] [email protected] 3 points 5 hours ago

I'm integrating my Mac mini (running Asahi Linux) into my server setup. It's slow going as I also have to move some data around so I can repurpose some hard drives.

[–] [email protected] 1 points 5 hours ago

Have fun! I'm running fedora 41 on my old iMac 2014, and it's great! I've also got Asahi Linux on my m1 Mac mini. I don't miss macos at all.

[–] [email protected] 14 points 1 day ago (1 children)

We did the same. Amazon can get fucked.

[–] [email protected] 2 points 3 days ago (1 children)
[–] [email protected] 7 points 4 days ago* (last edited 4 days ago) (1 children)

On desktop skip the ProtonVPN app and just use the official WireGuard app with the ProtonVPN config files which you can easily download from proton's website. If you're on Linux with gnome you don't even need the wireguard app. You can just use the GUI network manager app to connect with the config files.

Edit: stupid autocorrect

[–] [email protected] 5 points 5 days ago

Thank you for this!!!

[–] [email protected] 7 points 5 days ago

Right! I'm having a blast with my server.

[–] [email protected] 2 points 1 week ago
[–] [email protected] 65 points 1 week ago (1 children)

100% this. Why would I go back to another centralized corpo line must go up service that will inevitably enshittify when we got lemmy right here?

[–] [email protected] 4 points 1 week ago (2 children)

Another great option is Yourls. I’ve been using it for years and it’s been fabulous

 

This is just me celebrating a small win. I've been slowly learning bash scripting, and just now I was able to quickly write a simple bash script to automate a file moving task without referring to my notes or the web!

It's not a super complicated script, I'm just happy I'm starting to internalize the knowledge I've been building.

I've been organizing my media files after ripping our DVD collection. I had all the files for The Smurfs cartoon (love the Smurfs) in the main Smurfs show folder. I wanted to put them all into their respective season folders (Season.XX). Here's the script:

#! /bin/bash

for number in {01..09}; do
	find . -type f -name "The.Smurfs.S$number*" -exec mv {} Season.$number/ \;
done

I could have done it as a one liner, but I like to keep things like this for future reference.

 
 

EDIT WITH UPDATE: Operation went off without a hitch! I'm now up and running with the 512GB nvme drive! Next stop is dual booting nixos, which was the whole reason for switching to the larger drive.

ORIGINAL POST:

I’ve got a laptop running Arch (btw), with a 128GB nvme in it. The nvme has two partitions. EFI boot, and a luks encrypted lvm.

I’ve got a 512GB nvme I want to swap in. I think I can clone the device with dd, update the uuids, expand the lvm, and drop in the 512 nvme, but my searching hasn't given me a clear confirmation of this. Am I correct in my thought process, or am I setting myself up for disaster?

 
 

Edit 4: I think I've fixed the issue. I uninstalled vim, deleted ~/.viminfo and /etc/vimrc, then reinstalled vim. I jumped around a file a bit, went in and out of edit mode, and type a bunch of ~ and it didn't jump the text around at all. Still not sure what I did, but it appears this variation of turning it on and off again worked.

I'm hoping someone can help me with this.

I was holding my laptop while I had a vile open in vim, and I slipped, mashing a bunch of keys on the keyboard by mistake.

After doing this, I can't type the ~ character anymore. Anytime I try to type it, it jumps the text to the last line, putting the last line at the top of the editing screen so that's the only line of text showing.

I thought maybe I had set an option that would show up in ~/.vimrc, but there's no ~/.vimrc file. There is a /etc/vimrc file, and a ~/.viminfo file.

I've searched and had no luck finding out what I did to cause this behavior. I also tried looking through the vim manpage and couldn't find any info there either.

Edit 3: I just installed neovim and in neovim it acts as expected when I type the ~. Something I did notice is that in vim, I now have a blinking block cursor in insert mode as well as in visual mode, while in neovim, it's a block cursor in visual mode and a vertical bar cursor in insert mode. I think this was the normal behavior in vim prior to whatever the heck I did.

Hoping someone knows what the heck I did. Thank you!

Edit: clarified what happens when I try to type ~

Edit 2: added details of the .vimrc and .viminfo files

 

Had to do them quietly so I didn't wake her.

 

Edit 2: Fixed! Thanks to @[email protected] for this github issue link.

The solution is in the last comment suggesting to set ManageForeignRoutingPolicyRules=no in /etc/systemd/networkd.conf

Original post is below...

So I've got something I don't quite know how to find a solution for and I'm hoping this lovely community can help!

I've been experimenting with Arch (btw) with Hyprland to learn more about the install process, and linux in general, and to see if I like tiling window managers (I do).

I've installed this on a thinkpad I use for tinkering/learning, and the problem I'm encountering is that when I open up the laptop and the system resumes from suspend, the VPN connection is active, but broken, or maybe leaky.

What I mean by that is prior to suspending, with the vpn connection active, if I run curl ip.me, the result is the vpn server ip, Which is the expected behavior.

After resuming from suspend, when I run curl ip.me, I get my naked home ip instead of the vpn ip.

At first I thought I was losing the vpn connection, but when I check the status with sudo wg, it will show the vpn connection is still active, like so:

interface: wg0
  public key: pubkeyhere
  private key: (hidden)
  listening port: 38014
  fwmark: 0xca6c

peer: peer here
  endpoint: ip.endpoint.here:51820
  allowed ips: 0.0.0.0/0
  latest handshake: 7 seconds ago
  transfer: 8.07 KiB received, 3.77 KiB sent

I've tried searching for this to figure out what's happening, and I'm not finding anything, likely because I don't know how to properly query for results.

What I've been doing is just manually running an alias on resume that brings the vpn connection down, and then back up again with:

sudo wg-quick down wg0 && sleep 2 && sudo wg-quick up wg0

I've tried different variations on a script placed in /usr/lib/systemd/system-sleep to no avail. I have verified that that the script is running properly. I tested first with echo "sometext" > ~/somefile for both pre and post and the script is executed on suspend and again on resume.

Script example:

#! /usr/bin/bash

case $1/$2 in
	pre/*)
		;;
	post/*)
		sleep 2
		/usr/bin/wg-quick down wg0
		sleep 2
		/usr/bin/wg-quick up wg0
		;;
esac

Despite this script executing what is essentially the same command as my alias on resume, my home ip is what results from running curl ip.me.

Other details that may or may not be relevant.

I've got a [email protected] systemd service that runs on startup to connect to the vpn.

System is Arch with Hyprland, iwctl to manage the wifi connection. I'm not using hyprlock. When I close the laptop it suspends the session, and when I open it back up it just resumes it, no lock screen or password needed.

I don't really understand what's going on here, and I haven't been able to find any information that helps me figure out what's happening or how to address it. Any help would be greatly appreciated!

Edit: just wanted to add that I've also looked through journalctl and I haven't found anything useful (to me) there.

 

Growing up these donuts were a new year's tradition. I hadn't had them for decades, so I decided to learn how to make them. They're super easy to make and super delicious. It's a fried donut with a wonderfully crispy outer shell and a soft pillowy interior. They're traditionally topped with warm honey, cinnamon, and chopped walnut (I also toasted the walnuts).

 
 

EDIT 2: After learning that aliases aren't really suited for regex, and trying the script, I thought maybe reloading the .bashrc file wasn't enough to refresh the aliases, so I closed my terminal and after reopening the terminal and trying the script again it works just fine.

Okay, I've tried searching for help on this and I can't find anything, and I'm banging my head on my desk trying to figure out how to get this to work.

I routinely have to capitalize the first letter in a series of files that are passed to me. So I'll get:

file01
file02

And so on. I use perl rename (I'm using Fedora) with the following command and regex, and from within the directory it works as expected:

prename 's/(^[a-z]?)/\U$1/' *

I do this a lot. At least once a day, which calls for an alias or script.

I tried adding it as an alias to my .bash_aliases like so:

alias cap="prename 's/(^[a-z]?)/\U$1/' *"

And when I do, instead of capitalizing the first letter of the filenames it removes them. Searching got me nothing, in part because I probably am not asking the right question.

So then thought I'd write a dead simple bash script named cap (after removing the alias and reloading .bashrc)

#! /bin/bash

prename 's/(^[a-z]?)/\U$1/' *

And when I use cap in the directory, the script also cuts off the first letter instead of capitalizing it.

I suspect it's the $1 variable in the regex that's causing the problem, but I can't figure out how to address it so it works correctly in the alias or the script.

EDIT: I just tried some more searching and found that regex won't work in aliases, so it explains that, but I still can't figure out how to get it to work in the script.

 

Hello! I’m looking for book recommendations for learning programming fundamentals.

To be clear, I’m not necessarily looking for a book on learning language(s), but rather, programming, theory I guess you might call it?

For example, I’ve been playing around a lot in my terminal writing bash scripts, and I just implemented my first function. Another example, I know the phrase “Object Oriented programming”, but have no idea what it means.

I learn well by doing, and I’ve learned a lot just writing scripts and reading about bash scripting, but I also realize there’s a lot about programming at a higher level that I know nothing about.

7
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

Both songs have pig in the title

view more: next ›