Skip to content

Instantly share code, notes, and snippets.

View tricantivu's full-sized avatar
🎯
Focusing

Alejandro Cervera tricantivu

🎯
Focusing
View GitHub Profile
@tricantivu
tricantivu / commit-msg
Created July 5, 2023 04:36
My commit-msg hook
#!/usr/bin/env bash
readonly MAX_SUBJ_LINE_LEN=75
readonly MAX_BODY_LINE_LEN=72
read -r subject < "$1"
if [[ "${subject}" =~ ^Revert ]]; then
# Skip checking commit message generated by git-revert(1)
exit 0
@tricantivu
tricantivu / crontab
Last active October 22, 2023 00:43
Personal guidelines for writing cronjobs
# 1. Wrap lines as you wish.
# 2. Do not use tabs for indentation.
# 3. Write a blank line after each cronjob.
# 4. Use numerical values instead of names.
# 5. Set the least amount of directories in the PATH environment variable as possible.
# 6. Use the mktemp command to create files.
# 7. Delimit fields by one space character, unless more are needed.
# 8. Group cronjobs performing similar tasks (e.g deleting files) by sections.
#
# Use a comment block to indicate a section.