When using tmux, selecting and copying multiple lines of text can be a hassle, especially when using splits (highlighting lines will cross pane borders, copying contents from the other pane...
...too) and when the user wishes to copy (thus, select) lines that have already scrolled out of the viewport in the current pane. One idea would be to enable mouse...
...how locales work. This is especially relevant when using PostgreSQL databases (of any version), since those depend on the locales functionality provided by glibc as well. It's recommended to...
...likely not affected. How to fix the problems Postgres documentation recommends to recreate indexes involving string-like data types: All indexes involving columns of type text, varchar, char, and citext...
You can execute systemctl --user --failed to check for failed systemd user units. But let's face it: It's inconvenient and you'll probably miss failures. Better use desktop...
...pipewire.socket ConditionUser=!root [Service] LockPersonality=yes MemoryDenyWriteExecute=yes NoNewPrivileges=yes RestrictNamespaces=yes SystemCallArchitectures=native SystemCallFilter=@system-service Type=simple ExecStart=/usr/bin/pipewire Restart=on-failure Slice=session.slice [Install] Also=pipewire.socket
With passenger-status --show=requests you can get a huge JSON showing current information about the running passenger processes. This can be useful if you want to find out what...
...a passenger process is doing at the moment (for e.g. if one worker seems to be stuck): * PID: 4273 Sessions: 1 Processed: 47 Uptime: 50m 53s CPU: 43% Memory : 3644M...
...is great when dealing with JSON data. Check out the official jq Manual. Content Select only specific keys Modify keys Set default value Filter by key name Delete specific keys...
...Overwrite/add nested key value Select only specific keys Command jq '.[] | { Name, OriginString }' Input [ { "Id": 1, "Name": "foobar.net", "OriginString": "/FOOBAR/foobar.net" }, { "Id": 2, "Name": "barfoo.baz", "OriginString": "/FOOBAR/barfoo.baz" } ] Output { "Name": "foobar.net", "OriginString": "/FOOBAR/foobar.net...
...create a Gemfile for installing all required gems. Gemfile # Gemfile gem 'docker-api' gem 'serverspec' Then we install them bundle install Preparation Create the directory where the Tests are going...
...to live. Add the folder to .dockerignore since we wo not want the test to be included within our final container image. mkdir spec echo spec >> .dockerignore spec/spec_helper.rb
...to the public (as it should be!), here's how to open a psql shell inside Kubernetes and connect to the database. Make sure to replace the variables appropriately.
...run postgresql-client \ --image=postgres \ --namespace=$NAMESPACE \ --stdin=true --tty=true \ --rm=true \ --env="PGPASSWORD=$PASSWORD_FOR_POSTGRES \ --command -- \ psql --host=$HOSTNAME_FOR_POSTGRES --username=$USERNAME_FOR_POSTGRES $DATABASE_FOR...
Systemd's networkd will drop IP-Addresses configured by other processes like Keepalived's VRRP, when it is restarted. This may happens on updates. To prevent this following settings are...
...critical: yes to /etc/netplan/50-cloud-init.yaml eth1: addresses: - 192.0.2.67/24 gateway4: 192.0.2.1 nameservers: addresses: - 198.51.100.42 - 198.51.100.53 search: - example.lcal critical: yes run netplan generate This will add the CriticalConnection to your networkd configuration...
First we export the checks on the nodes we want to monitor: @@nagios_service { “check_unicorns-${::hostname}”: host_name => $::hostname, service_description => ‘Unicorn Status’, check_command => ‘check_unicorn-${::hostname...
...Then we realize the resources on the Nagios server Nagios_service <<| |>> Now it is quite easy to create new monitoring checks with Puppet. With the ease of creating monitoring checks...
Canonical does not ship Ubuntu 24.04+ Vagrant images due to HashiCorps switch to the Business Source License (BSL). There is currently no open source fork of Vagrant. Alternatives
...cloud-image/ubuntu-24.04 which can be used. Caveats The images are unmodified but unofficial. Sharing via the /vagrant folder is not possible. Use SSH/SFTP instead...
...use the puppetdb_query feature. This can result in more complex code but has several benefits: you can use more complex puppetdb queries to get the resources you want than...
...db', $vhost['parameters']['dbuser'], { 'password' => $vhost['parameters']['dbpassword'], 'type' => $type, 'extensions' => $vhost['parameters']['dbextensions'], 'schemas' => $vhost['parameters']['dbschemas'], 'charset' => $vhost['parameters']['dbencoding'], 'collate' => $vhost['parameters']['dbcollate'], 'host' => $host, }) }
...type of network card is used for a given network interface on a linux system, e.g. because the system has multiple network cards, try and match the driver to the...
...interface name: $ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback...
...to mix different database dumps. It also requires that the mixed tables do not share relations to other database objects. Scenario You've got two database dumps: dump_a.pgdump dump_b.pgdump
...that the selected table(s) might depend upon. Therefore, there is no guarantee that a specific-table restore into a clean database will succeed. Valid restore To archive a complete...
When a nginx reverse proxy complains about upstreams sending too big headers, tweaking the buffers responsibly can help to prevent this issue. Example log message: upstream sent too big header...
...while reading response header from upstream, client: 192.0.2.100, server: localhost, request: "GET /index.html HTTP/1.1", upstream: "http://198.51.100.123:80/index.html", host: "192.0.2.10:80" The cause This behaviour was caused by an application...
It is possible to manipulate the forwarded ports of an established interactive SSH session. This is done by opening the command line with the escape character ~C. This will open...
...a ssh> prompt. If it doesn't, make sure it's the first character in a line, i.e. press enter first. You have following commands at your disposal
...your HTTP request with curl, you can use the -w (--write-out) option: curl --silent -o /dev/null -w "%{time_connect};%{time_starttransfer};%{time_total};%{time_appconnect};%{time_pretransfer}\n...
...With -w you can make curl display informations for your HTTP request. As seen in the example above you can e.g. output this in a CSV format for further analysis...
...have multiple exported resources that are identical. There are nodes that provide the same services for failover reasons. It is likely to have duplicate resources, when exporting nagios_check from...
...everything is fine. But when it comes to realizing the resources on the monitoring server, the puppetrun will fail due to the duplicate addresses. So how to mitigate this issue...
It's not possible to change the bwlimit of Proxmox storages via the Web-UI (at least in Proxmox 7.x). To change the bwlimit you need to use the...
...pvesm command and specify the limit for the desired category. For example to increase the bwlimit for migrations: pvesm set $NAME_OF_STORAGE --bwlimit migration=$INTEGER_LIMIT # example
If you're trying to start a cloud-init based Ubuntu VM with KVM you will suffer long boot times and confusing output on the terminal. If you want to...
...to remove cloud-init. wait until the VM boots login echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg sudo apt-get purge cloud-init sudo rm -rf /etc/cloud/; sudo rm...
...relaying information to input variables it's happening via environment variables. Depending on the size of the content of the variable it might exceed your OS limits. This is independent...
A possible workaround is to use a generated file to load the input instead of the env variable, e.g. # WORKAROUND # the variable my_huge_input cannot be...
If you want to expand your Areca Raid by swapping out the disks for larger ones you will need to do the following: Swap out all disks one by one...
...and wait until the syncronisation is finished in between. Reboot your server and enter the Raid Controller Configuration by pressing TAB at the right time. In the menu go the...
...common providers like the AWS one can quickly add up to a lot of storage space wasted. Each root module will download a copy of the same provider file. The...
...AWS provider is over 200 MB in size. To avoid creating multiple copies of the same file, you can use the Terraform Plugin Cache. Configuring the plugin cache:
There's a simple way in bolt to run commands from a file without caring about BASH escaping: # /home/user/foo.sh echo "$(hostname -f): $(uptime)" echo "${USER}" echo "${SERVERLIST}" | bolt command run...
...foo.sh --run-as root --targets - Use script run to run a ruby script: #!/usr/bin/env ruby # /home/user/bar.rb puts 'Hello, world!' echo "${SERVERLIST}" | bolt script run ./bar.rb --targets...
Here's a one-liner to view base64 encoded secrets in kubernetes. Make sure you have jq installed. $ kubectl get -n $NAMESPACE secret/$SECRET_NAME -o json| jq '.data | map...
...values(@base64d)' { "database": "secret1", "endpoint": "secret2", "username": "secret3", "password": "secret4...