Skip to content

Instantly share code, notes, and snippets.

View michaelfranzl's full-sized avatar
🖥️
Developing software

Michael Franzl michaelfranzl

🖥️
Developing software
View GitHub Profile
@michaelfranzl
michaelfranzl / gstreamer-compilation-debian.md
Last active January 17, 2018 07:29
Compilation of GStreamer, and as many plugins as possible, from upstream git sources, on Debian 9 (Stretch)

The following shell commands install GStreamer for an unprivileged user, not system-wide. Adapt INSTALLDIR for your purposes. The GStreamer binaries will be installed into $INSTALLDIR/bin. Normally you would set INSTALLDIR to your home directory (you need to specify it as an absolute path). Consider adding $INSTALLDIR/bin to your PATH environment variable. After installation, check the outputs of which gst-launch-1.0 and gst-launch-1.0 --version, to see if you are using the correct binaries.

All following shell commands should be run as an unprivileged user, with the exception of apt-get install's. I have included installation instructions of as many external dependencies as possible to maximize the number of GStreamer plugins built. You may want to use only a subset of them. I may have forgotten some external dependencies, in which case the compilation should not fail, but simply the corresponding plugin skipped. Check the last output lines of each autogen.sh run to see which plugins will

@michaelfranzl
michaelfranzl / gpg-automate-full-generate-ec-keys.sh
Created September 10, 2019 18:54
Automate GPG to generate a Curve25519 primary key, and Curve25519 subkeys for signing, encrypting and authenticating.
#!/bin/bash
# Automate GPG to generate a Curve25519 primary key,
# and Curve25519 subkeys for signing, encrypting and authenticating.
#
# Developed for gpg (GnuPG) 2.2.12.
#
# Copyright (c) 2019 Michael Karl Franzl
#
# Copying and distribution of this file, with or without modification,
@michaelfranzl
michaelfranzl / verify-gpg-paperkey.sh
Created September 10, 2019 19:08
Verify, automate and integrate gpg and paperkey
#!/bin/bash
# This script asserts the correctness of the program `paperkey`
# by David Shaw. [1] It also exemplifies the automation and integration
# of `gpg` and `paperkey`.
#
# If the program exits with code 0, then the test (see `function main`)
# was successful.
#
# Developed for gpg (GnuPG) version 2.2.12 and paperkey version 1.6.
@michaelfranzl
michaelfranzl / generate-self-signed-certificates-cfssl
Created April 30, 2020 14:59
Generate self-signed certificates using cfssl
#!/bin/bash
# apt install -y golang-cfssl
echo '{"CN":"CA","key":{"algo":"rsa","size":2048}}' | \
cfssl gencert -initca - | \
cfssljson -bare ca -
echo '{"signing":{"default":{"expiry":"100000h","usages":["signing","key encipherment","server auth","client auth"]}}}' > ca-config.json
@michaelfranzl
michaelfranzl / install_neovim.sh
Created May 13, 2020 08:00
Download, compile and install newest neovim for the local user
INSTALL_DIR=$HOME/progs
git clone git@github.com:neovim/neovim.git
cd neovim
# Install prerequisites listed by https://github.com/neovim/neovim/wiki/Building-Neovim#build-prerequisites
sudo apt install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=$INSTALL_DIR CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR" make
@michaelfranzl
michaelfranzl / phantom.py
Created October 16, 2017 09:41
Simple but fully scriptable headless QtWebKit browser using PyQt5 in Python3, specialized in executing external JavaScript and generating PDF files. A lean replacement for other bulky headless browser frameworks.
#!/usr/bin/python3
"""
# phantom.py
Simple but fully scriptable headless QtWebKit browser using PyQt5 in Python3,
specialized in executing external JavaScript and generating PDF files. A lean
replacement for other bulky headless browser frameworks.