Skip to content

Instantly share code, notes, and snippets.

View atipico's full-sized avatar

Rogério Madureira atipico

  • Rio de Janeiro, Brasil
View GitHub Profile
@markusfisch
markusfisch / mime.sh
Last active March 24, 2023 16:22
bash functions to dump and inspect a message in MIME format
#!/usr/bin/env bash
##############################################################################
#### MIME interface
##############################################################################
# Parse message in MIME format and create a temporary cache directory
mime_parse()
{
MIME_CACHE=${MIME_CACHE:-`mktemp -d ${BIN}.XXXXXXXXXX`}
@markusfisch
markusfisch / base64.sh
Last active June 3, 2024 00:39
base64 fallback implementation in bash
#!/bin/bash
# Fallback base64 en-/decoder for systems that lack a native implementation
#
# @param ... - flags
which base64 &>/dev/null || {
# if even od is missing
which od &>/dev/null || od()
{
local C O=0 W=16