Skip to content

Instantly share code, notes, and snippets.

View nilreml's full-sized avatar
💾
Core dump in progress

Merlin nilreml

💾
Core dump in progress
  • Hamburg, Germany
  • 10:08 (UTC +02:00)
View GitHub Profile
Import CA trust
sudo mkdir /usr/local/share/ca-certificates/[org]
cp [CA/CAchain.crt] /usr/local/share/ca-certificates/[org]
sudo update-ca-certificates
Create a private key
openssl genrsa -out server.key 4096
Generate a new private key and certificate signing request
openssl req -out server.csr -new -newkey rsa:4096 -nodes -keyout server.key
su -
apt install vim git firmware-linux-*
exit
cd
mkdir git
cd git
git clone https://github.com/nilreml/caveat-emptor
cd caveat-emptor
cd bootstrap-debian
./bootstrap.sh
@nilreml
nilreml / mysql
Last active March 10, 2024 11:15
NOTE: make sure you understand each option's implications before applying any of this
[mysqld]
# general
max_connections=4000
table_open_cache=8000
table_open_cache_instances=16
max_prepared_stmt_count=512000
back_log=1500
Slow apt search:
rm /etc/apt/apt.conf.d/docker-gzip-indexes
rm /var/lib/apt/lists/*.lz4
apt update
NOTE: don't do any of this unless you understand all it's implications
https://engineering.linkedin.com/performance/optimizing-linux-memory-management-low-latency-high-throughput-databases
Linux's NUMA optimizations can be effectively disabled by doing the following:
Turn zone reclaim mode off: add vm.zone_reclaim_mode = 0 to /etc/sysctl.conf and run sysctl -p to load the new settings.
Enable NUMA interleaving for your application: run with numactl --interleave=all COMMAND
These are now the defaults on all our production systems.
Filesystem benchmarking:
i don't care about cookies
ublock origin
https://github.com/yourduskquibbles/webannoyances#one-click-installation
about:config
accessibility.browsewithcaret_shortcut.enabled;false
browser.aboutConfig.showWarning;false
browser.backspace_action;0
browser.compactmode.show;true
browser.download.animateNotifications;false
browser.compactmode.show true
browser.search.region EN
browser.tabs.insertAfterCurrent true
browser.tabs.loadBookmarksInBackground true
browser.tabs.loadBookmarksInTabs true
browser.tabs.tabClipWidth 10000
browser.toolbars.bookmarks.visibility always
browser.translations.neverTranslateLanguages de
browser.uidensity 1
full-screen-api.transition.timeout 0
# Best practice pyproject.toml:
# https://github.com/airbytehq/airbyte/blob/master/airbyte-lib/pyproject.toml
[tool.coverage.run]
include = ["src/*"]
parallel = true
branch = true
[tool.coverage.paths]
check for bash version 4+ (POSIX-compliant) :
[ -z "${BASH_VERSINFO}" ] || [ -z "${BASH_VERSINFO[0]}" ] || [ ${BASH_VERSINFO[0]} -lt 4 ]
path to script even if symlinked:
SCRIPT_DIR="$( cd -P "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )"
Apt cache & non-interactive config:
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008,DL3014
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt/lists \
# Use german apt mirror