Skip to content

Instantly share code, notes, and snippets.

View serious-angel's full-sized avatar
...cogito, ergo sum...

Artfaith serious-angel

...cogito, ergo sum...
View GitHub Profile
@serious-angel
serious-angel / 1_image_layers.sh
Last active December 6, 2024 17:29
Docker image layer data preview quick experimental Bash script
# /usr/bin/env bash
_totalSize=0;
_Fmt() ( numfmt --from=iec --to=iec --suffix B --format='%0.2f' -- "${1}K"; );
_DirSize() ( sudo -- bash -c 'if [[ -d "$1" ]]; then du -ks -- "$1" | cut -f1; else printf ?; fi;' - "$1"; );
_TreePath() ( sudo -- tree -avr --charset=ascii --dirsfirst --du -- "$1"; );
_PreviewLayers()
{
@serious-angel
serious-angel / gist:ef94b28b09f5828e41e555acac60c9cf
Created November 11, 2022 05:56
[Stack Overflow] OpenSSL Certificate Authority signed certificate test
#! /usr/bin/env bash
# Author: Artfaith
# Date: 2021
# Related: https://stackoverflow.com/questions/66357451/why-does-signing-a-certificate-require-cacreateserial-argument
# -------------------------- #
# User variables #
# -------------------------- #