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
'use strict'; | |
/** | |
* Javascript version of https://gist.github.com/jbroadway/2836900 | |
* | |
* Slimdown - A very basic regex-based Markdown parser. Supports the | |
* following elements (and can be extended via Slimdown::add_rule()): | |
* | |
* - Headers | |
* - Links |
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
#!/usr/bin/env node | |
// How to use: | |
// 1. Create a custom check on CloudRadar called 'beancounters', which should be updated every 5 minutes. | |
// 2. Insert the custom check token below. | |
// 3. Execute this script every 5 minutes with root privileges, | |
// e.g. by calling `sudo crontab -e` and adding `*/5 * * * * /usr/bin/node /<Path to script>/check-user-beancounters.js` | |
const axios = require('axios').default; | |
const { exec } = require('child_process'); |