Write one sentence per line to make git diff
s well readable.
#!/bin/bash | |
service_name="backup-all-secrets" | |
secret_list=( `docker secret ls --format "{{ .Name }}"` ) | |
cmd="docker service create \ | |
--name $service_name \ | |
--constraint node.hostname==`hostname` " | |
for secret in "${secret_list[@]}" |
Within development of a DargStack, access to the web apps should be routed via the locally resolved domain [project_name].test
and its subdomains.
Therefore one needs to configure the local DNS resolution to make this address resolvable.
This can either be done by simply adding this domain and all subdomains to the operation system's hosts file or by setting up a local DNS server.
An advantage of the latter method is that subdomain wildcards can be used and thus not every subdomain needs to be defined separately.
Here is an example configuration for dnsmasq that uses the local DNS server on top of the router's advertised DNS server:
#!/bin/bash | |
# Exit on errors, use last pipe error code, do not overwrite files, ensure | |
# variables exist | |
set -o errexit -o pipefail -o noclobber -o nounset | |
# allow matching of files by glob directly without find | |
shopt -s globstar nullglob | |
# Set color codes for use with echo |
- https://csp-evaluator.withgoogle.com
- https://www.debugbear.com/resource-hint-validator
- https://developers.google.com/speed/pagespeed/insights
- https://observatory.mozilla.org
- https://realfavicongenerator.net
- https://search.google.com/search-console
- https://search.google.com/test/mobile-friendly
- https://securityheaders.com/
- https://tagassistant.google.com
- https://thinkwithgoogle.com/intl/de-de/feature/testmysite/
Source: https://wiki.archlinux.org/title/Solid_state_drive/Memory_cell_clearing
Make sure SSD is not frozen.
sudo hdparm -I /dev/sdX | grep frozen
Enable security by setting a user password.
#!/bin/bash | |
# Exit on errors, use last pipe error code, do not overwrite files, ensure | |
# variables exist | |
set -o errexit -o pipefail -o noclobber -o nounset | |
# allow matching of files by glob directly without find | |
shopt -s globstar nullglob | |
# Set color codes for use with echo |
#!/bin/bash | |
# Use evtest on last "Genius Wireless Mouse" device. | |
cat >"/etc/udev/hwdb.d/90-custom-presenter.hwdb" <<EOL | |
evdev:input:b0003v0458p0189* | |
KEYBOARD_KEY_70051=space | |
KEYBOARD_KEY_70052=p | |
EOL | |
sudo systemd-hwdb update | |
sudo udevadm trigger |
#!/usr/bin/expect -f | |
spawn ssh-add $env(HOME)/.ssh/id_ed25519 | |
expect "Enter passphrase for $env(HOME)/.ssh/id_ed25519:" | |
send "$env(SSH_PASSPHRASE)\n" | |
expect "Identity added: /home/elements/.ssh/id_ed25519*" |
from io import BytesIO | |
from itertools import tee | |
import base64 | |
import requests | |
import vobject | |
# change this variable! | |
filename = 'contacts' |