This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| title () | |
| { | |
| local msg="$@" | |
| echo | |
| echo "========================" | |
| echo " $msg" | |
| echo "========================" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| title () | |
| { | |
| local msg="$@" | |
| echo | |
| echo "========================" | |
| echo " $msg" | |
| echo "========================" | |
| } | |
| log () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script reports the most common CPU flags to pay attention. | |
| # Usage: | |
| # curl https://gist.githubusercontent.com/mrjk/8a74b4597716bebea2a0b965c06b54ff/raw/26cd0e43d1694bf40cb5f2935ff88f36a0f77a81/report-disk-health.sh | bash | |
| report_smart() { | |
| command -v smartctl >/dev/null || { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script reports the most common CPU flags to pay attention. | |
| # Usage: | |
| # curl https://gist.githubusercontent.com/mrjk/28a1082d201c7c8c30b788a7b47e820d/raw/54c37076fd8e3f118867d1575efe074724eb1d5b/report-cpu-flags.sh | bash | |
| declare -A flags=( | |
| [vmx]="virt: Intel Virtualisation (VT-x)" | |
| [svm]="virt: AMD Virtualisation (AMD-V)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #_IDENT="USER_HOST" | |
| _IDENT=$(id -un)@$(hostname -f) | |
| _DATE=$(date +'%Y%m%d') | |
| _OUT="$(id -un)/.ssh/" | |
| _OUT="$(getent passwd "${USER}" | cut -d: -f6)/.ssh/" | |
| _IDENT2=${_IDENT2//@/_} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Common part | |
| # ================ | |
| FROM debian:12 AS base | |
| # Configuration | |
| ENV ENTRYPOINT_INFINITE=false | |
| ENV ENTRYPOINT_XTRACE=false | |
| ENV ENTRYPOINT_ROOT=/docker-entrypoints |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| """ | |
| Listener for supervisord | |
| How it works? | |
| It will wait all process_names (aka `program:NAME` sections) have reach the same state. Then | |
| it run another command. Its main use case is to allow supervisord services dependencies. | |
| Example configuration: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This snippet allow recurive loading of parent .envrc files | |
| # To put in your: ~/.config/direnv/direnvrc | |
| # Direnv Recursive mode | |
| # ========================= | |
| # Disable existing source_up commands | |
| source_up () | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Read one or more dotfiles, and load | |
| # | |
| # Author: mrjk | |
| set -euo pipefail | |
| _log () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # TEMPLATE_VERSION=2024-04-25 | |
| set -eu | |
| # App Global variable | |
| # ================= | |
| APP_NAME="${0##*/}" | |
| APP_AUTHOR="mrjk" |
NewerOlder