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
| #!/usr/bin/env bash | |
| # | |
| # ndom91 - 23.02.2023 | |
| # Based off of: https://github.com/ory/docs/blob/cef92348c250b06efdf65de0ce6c3721147a718c/code-examples/migrate-to-ory/0-get-auth0-user-data.sh | |
| # Management API Tokens: https://manage.auth0.com/dashboard/eu/checkly/apis/management/explorer | |
| # Auth0 API /users-exports docs: https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports | |
| GREEN='\033[0;32m' | |
| BLUE='\033[0;34m' | |
| BRED='\033[1;31m' |
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
| import assert from 'node:assert/strict'; | |
| import { describe, it } from 'node:test'; | |
| /** | |
| * @param {String} expression | |
| * @description Evaluate string mathematical expression | |
| */ | |
| function resolve(data) { | |
| return new Function(`return ${data}`)(); | |
| } |
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
| #!/usr/bin/env bash | |
| ######################################### | |
| # | |
| # Netbox Update Script | |
| # Author: ndomino | |
| # Update: 28.04.2022 | |
| # | |
| # Usage: sudo ./upgrade_netbox.sh [version_number] | |
| # i.e.: sudo ./upgrade_netbox.sh 3.1.0 |
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
| docker-machine create --driver generic --generic-ip-address 10.0.0.25 --generic-ssh-key ~/.ssh/id_ndo4 --generic-ssh-user ndo --engine-storage-driver overlay2 checkly-pi |
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
| // totp.js | |
| // Description: Will generate a TOTP from 2FA Seed. No dependencies. | |
| // Usage: | |
| // import { TOTP } from './snippets/totp' | |
| // console.log(TOTP(process.env.2FA_SEED)) | |
| // | |
| // Sources: | |
| // - Minor modernisation by ndom91 | |
| // - Minified pieces of [jsSHA](https://github.com/Caligatio/jsSHA) | |
| // - [js-otp](https://github.com/jiangts/JS-OTP) |
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
| global | |
| stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners | |
| log stdout format raw local0 info | |
| defaults | |
| mode http | |
| timeout client 10s | |
| timeout connect 5s | |
| timeout server 10s | |
| timeout http-request 10s |
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
| #!/usr/bin/env bash | |
| ######################################### | |
| # | |
| # Netbox Update Script | |
| # Author: ndomino | |
| # Update: 28.04.2022 | |
| # | |
| # Usage: sudo ./upgrade_netbox.sh [version_number] | |
| # i.e.: sudo ./upgrade_netbox.sh 3.1.0 |
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
| #!/usr/bin/env bash | |
| # Use 'containrrr/watchtower' to auto-update docker container image | |
| # argv[1] is used as docker container name to update | |
| docker run \ | |
| --rm \ | |
| -v /var/run/docker.sock:/var/run/docker.sock \ | |
| containrrr/watchtower \ | |
| --run-once \ | |
| "$1" |
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
| #!/usr/bin/env bash | |
| LOGS_FILES=( | |
| /var/log/messages # General message and system related stuff | |
| /var/log/auth.log # Authenication logs | |
| /var/log/kern.log # Kernel logs | |
| /var/log/cron.log # Crond logs | |
| /var/log/maillog # Mail server logs | |
| /var/log/boot.log # System boot log | |
| /var/log/mysqld.log # MySQL database server log file |