Install gems on local user folder instead of system wide

In order to test locally a Gemfile, define local path for the gems to avoid attempting to write to system-wide folders: bundle config set --local path '/home/username/.gem' bundle install

January 16, 2024 · 1 min · Pablo Iranzo Gómez

No matching key found

As you might have experienced… using a recent system to connect to a legacy one could be complicated as some insecure protocols have been disabled, with a message like: Unable to negotiate with 192.168.2.82 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss Create an entry like this in your .ssh/config file, so that insecure methods can be used to connect to a specific host: Host 192.168.2.82 HostKeyAlgorithms=+ssh-rsa KexAlgorithms=+diffie-hellman-group1-sha1 PubkeyAcceptedKeyTypes=+ssh-rsa User root or alternatively on the command line:...

August 25, 2023 · 1 min · Pablo Iranzo Gómez

Enable rootless podman on Fedora

With podman we can setup containers for being used for non root users by performing some simple steps: Install required packages dnf -y install slirp4netns fuse-overlayfs crun podman shadow-utils Force the number of user namespaces (might be required on some environments): echo "user.max_user_namespaces=28633" > /etc/sysctl.d/userns.conf sysctl -p /etc/sysctl.d/userns.conf Delegate Allows to define which resources are available1: mkdir -p /etc/systemd/system/[email protected] cat << EOF > /etc/systemd/system/[email protected]/delegate.conf [Service] Delegate=cpu cpuset io memory pids EOF To verify it has been done correctly, logout and login with the user and execute:...

January 27, 2023 · 1 min · Pablo Iranzo Gómez

Enable Libvirt rw socket on RHEL9

RHEL9 by default uses read-only socket which is not usable by some tools like Kcli… to enable it use: systemctl enable --now libvirtd.socket libvirtd-ro.socket systemctl stop libvirtd.service systemctl enable --now virtproxyd.socket virtproxyd-ro.socket systemctl stop virtproxyd.service

January 12, 2023 · 1 min · Pablo Iranzo Gómez

[python] Generate ranges from items

Some years ago, I added a script for updating headers for (C) in the python files I was developing for Risu. In this way, the header got the list of authors and years working on the files updated automatically. With the pass of the years, the list started to became a bit too long, so I worked on creating code for getting ranges instead. This is the code I used:...

November 25, 2022 · 2 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.