Skip to content

Instantly share code, notes, and snippets.

@svengo
svengo / docker-compose.yml
Created May 9, 2023 14:49
docker-compose.yml for Joplin
version: '2'
services:
db:
image: postgres:15-alpine
environment:
- TZ=Europe/Berlin
- POSTGRES_DB=joplin
- POSTGRES_USER=joplin
- POSTGRES_PASSWORD=secret
networks:
@svengo
svengo / AuthyToOtherAuthenticator.md
Created December 15, 2022 15:22 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@svengo
svengo / ssl-check.py
Created November 19, 2021 15:13 — forked from gdamjan/ssl-check.py
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket
@svengo
svengo / GitHub-Forking.md
Created April 24, 2021 07:38 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@svengo
svengo / update_mailcow.yml
Created April 15, 2021 12:59
Ansible update mailcow
---
- hosts: mailcow
vars:
mailcow_path: /srv/docker/mailcow-dockerized
tasks:
- name: Check for mailcow updates
become: yes
command:
chdir: '{{ mailcow_path }}'
@svengo
svengo / proxmox_resize_virtual_harddisc.sh
Last active March 27, 2021 11:00
Resize virtual partition and file system (Proxmox VM)
#!/bin/sh
# 1) Resize disk in Proxmox
# 2) Enlarge partition
growpart /dev/sda 1
# 3) Resize filesystem
resize2fs /dev/sda1
@svengo
svengo / debansstrap.sh
Last active March 25, 2021 12:03 — forked from psct/debansstrap.sh
Prepare fresh Debian for ansible management by created user "ansible" in sudoers (needs public ssh-Key in PUBKEY)
#!/bin/bash
# enable host for ansible
set -e
PUBKEY=""
id -u ansible > /dev/null 2>&1 || adduser ansible --disabled-password --gecos "" --quiet
mkdir -p /home/ansible/.ssh
echo "$PUBKEY" > /home/ansible/.ssh/authorized_keys
chown -R ansible /home/ansible/.ssh
apt-get update
apt-get install sudo
@svengo
svengo / backup_gitea.sh
Created February 23, 2021 15:55 — forked from sinbad/backup_gitea.sh
My Gitea Backup & Restore Scripts
#!/bin/bash
# `gitea dump` doesn't currently back up LFS data as well, only git repos
# It primarily backs up the SQL DB, and also the config / logs
# We'll backup like this:
# * "gitea dump" to backup the DB and config etc
# * tar / bzip all the repos since they will be skipped
# * Not rotated because git data is immutable (normally) so has all data
# * rsync LFS data directly from /volume/docker/gitea/git/lfs
# * No need for rotation since all files are immutable
@svengo
svengo / Dockerfile
Created April 17, 2019 13:46
Dockerfile for containrrr/watchtower
#
# Builder
#
FROM golang:alpine as builder
#ARG WATCHTOWER_VERSION=v0.3.3
ARG WATCHTOWER_VERSION=master
RUN \
apk add --no-cache \
@svengo
svengo / ts3server.sh
Created April 15, 2016 11:20
Teamspeak 3 server startup script for ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: teamspeak
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Teamspeak 3 server
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.