Skip to content

Instantly share code, notes, and snippets.

View dvigne's full-sized avatar

Derick Vigne dvigne

View GitHub Profile
@dvigne
dvigne / prepare-commit-msg.sh
Created April 14, 2020 07:08 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@dvigne
dvigne / CMake: Variable Dump
Created March 15, 2021 18:49 — forked from drautb/CMake: Variable Dump
This snippet will dump all CMake variables to the build output
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()