Skip to content

Instantly share code, notes, and snippets.

svengo /
Created April 10, 2024 12:29 — forked from pierrejoubert73/
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me


  1. Foo
  2. Bar
    • Baz
  • Qux
svengo / docker-compose.yml
Created May 9, 2023 14:49
docker-compose.yml for Joplin
version: '2'
image: postgres:15-alpine
- TZ=Europe/Berlin
- POSTGRES_DB=joplin
svengo /
Created December 15, 2022 15:22 — forked from gboudreau/
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 /
Created November 19, 2021 15:13 — forked from gdamjan/
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 /
Created April 24, 2021 07:38 — forked from Chaser324/
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 / update_mailcow.yml
Created April 15, 2021 12:59
Ansible update mailcow
- hosts: mailcow
mailcow_path: /srv/docker/mailcow-dockerized
- name: Check for mailcow updates
become: yes
chdir: '{{ mailcow_path }}'
svengo /
Last active March 27, 2021 11:00
Resize virtual partition and file system (Proxmox VM)
# 1) Resize disk in Proxmox
# 2) Enlarge partition
growpart /dev/sda 1
# 3) Resize filesystem
resize2fs /dev/sda1
svengo /
Last active March 25, 2021 12:03 — forked from psct/
Prepare fresh Debian for ansible management by created user "ansible" in sudoers (needs public ssh-Key in PUBKEY)
# enable host for ansible
set -e
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 /
Created February 23, 2021 15:55 — forked from sinbad/
My Gitea Backup & Restore Scripts
# `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 / Dockerfile
Created April 17, 2019 13:46
Dockerfile for containrrr/watchtower
# Builder
FROM golang:alpine as builder
apk add --no-cache \