All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

waja

Joined 6 months ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 94
waja's Avatar

waja / gist:836d1721f9514474b43482d43af426be

0 likes
0 forks
9 files
Last active 6 months ago

VPS Performance Tests

Test procedure https://dzone.com/articles/iops-benchmarking-disk-io-aws-vs-digitalocean

VPS 2016 Cloud 2

$ aptitude -y install -o quiet=2 ioping fio > /dev/null; time fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --output=/root/tempfile --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75; rm -f test.*; cat tempfile; ioping -c 10 /root | tail -4
Jobs: 1 (f=1): [m(1)] [100.0% done] [1529KB/580KB/0KB /s] [382/145/0 iops] [eta 00m:00s]
real	14m20.420s
user	0m14.620s
waja's Avatar

waja / gist:abe34566a2554fe6a552a04a8297dcf4

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/usr/bin/env bash
2
3 cdr2mask ()
4 {
5 # Number of args to shift, 255..255, first non-255 byte, zeroes
6 set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
7 [[ $1 -gt 1 ]] && shift ${1} || shift
8 echo "${1-0}.${2-0}.${3-0}.${4-0}"
9 }
waja's Avatar

waja / gist:9d4b45a8d761436f941660076cb4c929

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2 DOCKER_BASE=/srv/docker
3
4 mkdir -p ${DOCKER_BASE}/portainer/container.conf
5
6 cat > ${DOCKER_BASE}/portainer/container.conf/docker-compose.yml <<EOF
7 version: '3.7'
8 services:
9 portainer:
10 image: portainer/portainer
waja's Avatar

waja / gist:f1d63a6efc964a02ac989f5780295029

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2
3 [ -f /etc/dehydrated/hook.sh ] && . /etc/dehydrated/hook.sh
4
5 SASLDBFILE="/var/spool/postfix/etc/sasldb2"
6 SASLDBPASSWD="$(/usr/bin/which saslpasswd2)"
7 SASLDBLISTUSER="$(/usr/bin/which sasldblistusers2)"
8 LOGFILE="/var/log/sasl/createsasluser.log"
9 RSYNC="$(/usr/bin/which rsync)"
10 PWGEN="$(/usr/bin/which pwgen)"
waja's Avatar

waja / gist:a9d3a0cf847d4652b4f394afdff970d2

0 likes
0 forks
1 files
Last active 6 months ago

New location

Head over to https://github.com/waja/debian-update-cheatsheets/blob/stretch2buster/stretch2buster.sh

waja's Avatar

waja / gist:e7129e49039e41e7a2f74b8c8228df17

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2
3 # disable jessie-updates in /etc/apt/sources.list
4 sed -i 's/\(.*jessie\-updates\)/#\1/' /etc/apt/sources.list
5 # disable jessie-backports, it's deprecated
6 sed -i 's/\(.*jessie\-backports\)/#\1/' /etc/apt/sources.list.d/jessie-backports.list
7
8 apt-get update
waja's Avatar

waja / gist:6ed85a8a01d2480f807d23639263c4f6

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2
3 DATE="$(date +%d)"
4
5 psql_user="postgres"
6 psql_host="/var/run/postgresql/"
7 psql_port="5432"
8
9 [ -f /opt/gitlab/etc/gitlab-psql-rc ] && . /opt/gitlab/etc/gitlab-psql-rc
waja's Avatar

waja / gist:605fa0fffd904d869000126867010cd0

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2
3 if [ -r /opt/etc/default/backuppc-achive-rclone ]; then
4 source /opt/etc/default/backuppc-achive-rclone
5 else
6 source /etc/default/backuppc-achive-rclone
7 fi
8
9 if [ -r /opt/etc/backuppc-achive-rclone.conf ]; then
10 source /opt/etc/backuppc-achive-rclone.conf
waja's Avatar

waja / gist:4dd16066a0ed4e849f56a2d7c6fb8193

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2 # Creating some temp dir
3 TMPDIR=$(mktemp -d /tmp/d.XXXXXX) && \
4 trap 'rm -rf "${TMPDIR}"' EXIT && \
5 # Install lazydocker
6 LAZYDOCKER_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') && \
7 GITHUB_FILE="lazydocker_${LAZYDOCKER_VERSION//v/}_$(uname -s)_$(uname -m).tar.gz" && \
8 GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${LAZYDOCKER_VERSION}/${GITHUB_FILE}" && \
9 curl -o ${TMPDIR}/lazydocker.tar.gz -L ${GITHUB_URL} && \
10 tar xzvf ${TMPDIR}/lazydocker.tar.gz -C ${TMPDIR} && \
waja's Avatar

waja / gist:d82de12ce96c437a910c7047c0b6953b

0 likes
0 forks
1 files
Last active 6 months ago
1 #!/bin/bash
2 # wget https://gist.githubusercontent.com/waja/77e3d2febb0745478466344f0ce5a50e/raw/deploy_phpmyadmin_buster.sh -O /tmp/a && sh /tmp/a
3 # taken from https://github.com/phpmyadmin/phpmyadmin/issues/15236#issuecomment-507871960
4 [ $(grep buster-backports /etc/apt/sources.list.d/* | wc -l) -le 0 ] && cat <<EOF >> /etc/apt/sources.list.d/buster-backports.list
5 #
6 # Debian backports
7 #
8
9 deb http://ftp.de.debian.org/debian/ buster-backports main non-free contrib
10 deb-src http://ftp.de.debian.org/debian/ buster-backports main non-free contrib
Newer Older

Powered by Opengist ⋅ Load: 197ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文