This file contains 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
[Unit] | |
Description=Podman Container : %I | |
[Service] | |
Restart=always | |
RestartSec=30 | |
StartLimitInterval=600 | |
StartLimitBurst=3 | |
ExecStart=/usr/bin/podman start -a %i | |
ExecStop=/usr/bin/podman stop -t 30 %i |
This file contains 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/env bash | |
# Compress MySQL tables on disk. | |
# Author: Andrew Berry, andrew.berry@lullabot.com | |
# | |
# Compress all tables in a MySQL InnoDB database using compression from the | |
# Barracuda table format. Tables have to already be in the Barracuda file | |
# format to actually compress tables, otherwise the table setting is ignored. | |
# | |
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work. |
This file contains 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 | |
find $1 -type f -printf "%CY%Cm %s %p\n" | | |
/usr/bin/awk '{ total[$1] += $2 } END { for (period in total) printf "%s: %f\n", period, total[period]/1024^3 }' | | |
sort |
This file contains 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 | |
function git_submodule_unchanged () { | |
SUB_MODULE=$1 | |
GSC_RC=0 | |
pushd $SUB_MODULE > /dev/null | |
SUB_BRANCH=$(git branch | grep '*' | cut -d' ' -f 2) | |
if [[ "$(git log --pretty=oneline origin/${SUB_BRANCH}..${SUB_BRANCH})" != "" ]]; then | |
GSC_RC=1 | |
fi |
This file contains 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
function mkv2mp4 { | |
INPUT_FILE="$1" | |
OUTPUT_FILE="${INPUT_FILE%.*}.mp4" | |
if [[ "" == "${INPUT_FILE}" ]]; then echo "Usage: mkv2mp4 <file.mkv>" && return 1; fi | |
if [[ ! -f "${INPUT_FILE}" ]]; then echo "Argument not a file." && return 1; fi | |
if [[ -f "${OUTPUT_FILE}" ]]; then echo "Output file '$OUTPUT_FILE' already exists." && return 1; fi | |
ffmpeg -vcodec copy -acodec copy -map_meta_data outfile:infile -i "${INPUT_FILE}" "${OUTPUT_FILE}" | |
} |