...a MacBook that uses an M1 or M2 Chip. Documentation on the Internet is sparse and not even the Geniuses at the Genius Bar are 100% sure. We found out...

...your MacBook, using more than one external display is only possible with workarounds. Docking stations Whenever you're considering using more than 1 external display, it makes sense to consider...

Intel CPUs receive updates, including security relevant upgrades, through 2 channels: Firmware/UEFI BIOS updates can also update the microcode in CPUs. This is the preferred and persistent way

How to install an microcode update? If one is available and deemed sufficiently stable from Debian's or Ubuntu's perspective, the intel-microcode package is updated and...

Are My Indexes Affected? If your database has been created on an operating system with glibc version < 2.28 and later upgraded to an operating system with glibc >= 2.28, you...

...affected. To find out which indexes in our database are affected, run the following slightly modified query from the PostgreSQL documentation: CREATE extension amcheck; SELECT bt_index_check(index => c.oid...

...good thing. It's possible to configure this requirement at the web- or proxy server level, where nginx or apache will just redirect every request on http to https. Some...

...if the URL they've been called with contains the http or the https scheme and issue their own redirect response (usually 301 or 302) to https. This card is...

puppet.com

...agent manually. Example: # exec resource: exec { "update_rubygems_${user}_${version}": command => "${home}/.rbenv/shims/gem update --system ${version}", unless => "${home}/.rbenv/shims/gem -v | /bin/grep ${version}", } This does execute rbenv commands. If puppet runs...

If the project you're working on has, say, 39 repositories and counting in GitLab and you need all the repos checked out for some reason, here's how to...

...a personal access token for GitLab that has the API permissions. In your terminal, store this key in an env variable. For each group you want to check out:

If you have a single node elasticsearch instance and indices with replicas enabled your cluster state will be yellow. If you have replica shards they should be moved to a...

...different node for high availability purposes. With a single node this can't be accomplished. So you either build a ES cluster or you disable the replicas. Building a cluster...

This card is just about creating simple PostgreSQL dumps. This is no instruction for a backup strategy nor a guide for SQL dump performance optimization. Read before starting

...assume that all commands will be executed as local postgres user on a database server master. Please mind that you should stop the replication on a slave PostgreSQL server before...

...use puppet-lint to find dead code in your project: # You probably need to set some ENV Variables, see https://github.com/voxpupuli/puppet-ghostbuster#environment-variables export HIERA_YAML_PATH="/home/bob/code/puppet/hiera.yaml" export PUPPETDB_URL...

...your lambda function via terraform, this code is usually zipped and uploaded to Amazon S3 by terraform. The ZIP file's hash is then stored to terraform's state. However...

...you're collaborating with colleages e.g. via git, each run of terraform will possibly see a different hash of the code's ZIP archive and try to replace the lambda...

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...

...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

...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

JSON Web Tokens are often times used for authentication delegation from one system to another. They can be decoded for debugging purposes. While most tooling supports decoding base64, JWTs are...

...of type Base64url, which is slightly different and needs to be accounted for. This assumes you already have the JWT in hand, e.g. after scraping it out of an HTTP...

wkhtmltopdf is deprecated and shouldn't be used anymore. Please consider switching to another tool We can install wkhtmltopdf on your appserver if you need to generate PDF files...

wkhtmltopdf/wkhtmltopdf wkhtmltopdf/packaging Please note: We do not compile the package ourselves on the server. Instead, we install the most recent available version of the prebuilt package. Example:

...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...

makandra Operations

...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...

...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...

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...

...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, }) }

...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