Skip to content

Instantly share code, notes, and snippets.

View michaelb87's full-sized avatar

Michael Bierbaumer michaelb87

View GitHub Profile
@michaelb87
michaelb87 / pre-commit
Created January 23, 2024 14:31
Place in .git/hooks/pre-commit
#!/bin/sh
# NOTE: make file executable with:
# chmod +x .git/hooks/pre-commit
# Get the current branch name
branch=$(git rev-parse --abbrev-ref HEAD)
# Check if the current branch is 'main'
if [ "$branch" = "main" ]; then
cat bat_safe.sh
#!/bin/sh
sudo tlp setcharge 75 80 BAT0
sudo tlp setcharge 85 95 BAT1
cat bat_normal.sh
#!/bin/sh
sudo tlp setcharge 93 97 BAT0
http://www.thesis.guru master's thesis guide