Skip to content

Instantly share code, notes, and snippets.

View malte70's full-sized avatar

Malte Bublitz malte70

View GitHub Profile
@malte70
malte70 / openpgp.md
Created October 1, 2023 20:44
OpenPGP proof
@malte70
malte70 / _README.md
Created February 23, 2023 21:50
Nested relative import of a shell script

source a Bash/Zsh script relative to another sourced script

NOTE: GitHub doesn't allow subdirectories for Gists. foobar.sh belongs to bin/, and the two others go under lib/.

Let's assume we have one or more shell scripts in bin/, and multiple scripts with various utility functions in lib/. To easily use these utilities we also have a script called libscriptutils.inc.sh to single-source all of them.

@malte70
malte70 / .htaccess
Last active October 17, 2023 19:21
Nice looking preview for markdown files, used on https://f.malte70.de
#
# .htaccess
#
# Default: source
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^preview$
RewriteCond %{REQUEST_FILENAME} -f
@malte70
malte70 / sudo-termux.sh
Created October 28, 2016 03:26
Simple sudo for Termux (tested on CyanogenMod)
#!/data/data/com.termux/files/usr/bin/bash
#
# sudo-termux
# sudo for Termux/Android
#
# Copyright (c) 2016 Malte Bublitz, http://malte70.bplaced.net
# All rights reserved.
#
SCRIPT_NAME="sudo"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Date: 2018-05-15
This is the Off-The-Record fingerprint of malte.bublitz@riseup.net:
pluto: DDAEF27F 5639391C DBB73A74 43E08AB3 29563476
-----BEGIN PGP SIGNATURE-----

Keybase proof

I hereby claim:

  • I am malte70 on github.
  • I am malte70 (https://keybase.io/malte70) on keybase.
  • I have a public key ASD0TC-gatn8iWR9U0ksGHBqDBoq3XGLzoFFViyMiIfidQo

To claim this, I am signing this object:

@malte70
malte70 / .htaccess
Last active August 29, 2015 14:26
A small example for using M4 to generate HTML in a CGI environment
<Files style.css>
SetHandler default-handler
</Files>