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
| p=$(cat /sys/class/power_supply/BAT0/capacity); ! grep -q "Dischar" /sys/class/power_supply/BAT0/status && echo " ${p}%" && exit 0 || [ $p -gt 80 ] && echo " ${p}%" && exit 0 || [ $p -gt 60 ] && echo " ${p}%" && exit 0 || [ $p -gt 40 ] && echo " ${p}%" && exit 0 || [ $p -gt 20 ] && echo " ${p}%" && exit 0 || echo " ${p}%" |
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
| " ~g to insert 'git_username <git@email.com>' | |
| iab <expr> ~g substitute(system('git config --global user.name') . " <" . | |
| \system('git config --global user.email') . ">", '\n', '', 'g') |
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
| ## commit.ps1 --- Helper for creating semantic commits. | |
| # Copyright (c) 2022 Julian Orchard <jorchard@pm.me> | |
| ## Description: | |
| # Should be thought of as a temporary tool until used to doing it by default! | |
| # Reminder text from this Gist: | |
| # https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716 |
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 | |
| function does_image_need_resizing() { | |
| # Image File | |
| image=$1 | |
| # Split X:X Into Two Variables (d_1 and d_2) | |
| r=(${2//\:/ }) | |
| d_1=${r[0]} | |
| d_2=${r[1]} | |
| # Get Current Aspect Ratio |
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
| ' File: backup.vbs | |
| ' Author: Julian Orachrd (hello@julianorchard.co.uk) | |
| ' Description: This script mainly exists to ensure I | |
| ' remember to consider if a machine is | |
| ' trustworthy before backing up the database file | |
| ' Date: 10/01/2022 | |
| ' File System Object | |
| Set fso = CreateObject("Scripting.FileSystemObject") |