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
// For all the confusing Prometheus configuration and | |
// regular expressions, | |
// explained in examples. | |
// Remember, there are default values for each item if it's missing. | |
// regex is (.*), | |
// replacement is $1, | |
// separator is ; | |
// ,and action is replace |
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
# based on https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/ | |
33 * * * * unattended-upgrade --dry-run -d 2> /dev/null | grep 'Checking' | wc -l | sed -ne 's/^\([0-9]\+\).*$/security_updates_count \1/p' > /var/lib/node_exporter/textfile_collector/security_updates_count.prom.$$ && mv /var/lib/node_exporter/textfile_collector/security_updates_count.prom.$$ /var/lib/node_exporter/textfile_collector/security_updates_count.prom |
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
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |