FROM debian
ENV DEBIAN_FRONTEND="noninteractive"
INITRD="No"
ENV PACKAGES="openvpn"
| #!/bin/bash | |
| while [ 1 ]; do | |
| curl https://check.torproject.org/api/ip | |
| sleep 5 | |
| done |
| #!/bin/bash | |
| # We restart the docker stats command every 60 seconds to update the container list | |
| function display_forever() { # Repeat n times command. | |
| while [ 1 ]; do # --> C-like syntax | |
| clear | |
| eval "$@"; | |
| done | |
| } |
| #!/bin/bash | |
| NAMESPACE="ejabberd" | |
| EJABBERD_CLI="docker exec -i ejabberd-1 ejabberdctl" | |
| function gauge() { | |
| metric_name=$NAMESPACE"_"$1 | |
| help_message=$2 | |
| value=$3 |
| #!/bin/bash | |
| SERVER_MODEL=dedibox-xc | |
| SLACK_WEBHOOK_URI="https://hooks.slack.com/services/VERY/SECRET/TOKEN" | |
| while [ 1 ]; do | |
| is_available=$(curl https://www.online.net/en/dedicated-server/${SERVER_MODEL} | grep -c 'greentxt') | |
| if [ ${is_available} != 0 ]; then | |
| curl -X POST -d 'payload={"channel": "#your-channel", "username": "bot", "text": "Online server available", "icon_emoji": ":rocket:"}' ${SLACK_WEBHOOK_URI} | |
| fi |
| # | |
| # Google Apps Script | |
| # | |
| # | |
| # To set a "cron" trigger: | |
| # Edit > Current project's triggers > Add a new Trigger > "Main" function > Every 5 minutes | |
| # | |
| var GECKOBOARD_TOKEN_API = ""; |
First: generate scp command list. (to cp in terminal to send the file everywhere
$ ./get_ips_asg.sh | jq -r . | sed 's#^#scp load-test.py ec2-user@#g' | sed 's#$#:/tmp/load-test.py#g'
scp load-test.py ec2-user@54.93.255.106:/tmp/load-test.py
scp load-test.py ec2-user@35.158.214.117:/tmp/load-test.py
scp load-test.py ec2-user@52.59.253.207:/tmp/load-test.py
scp load-test.py ec2-user@35.158.119.156:/tmp/load-test.py
scp load-test.py ec2-user@52.59.251.109:/tmp/load-test.py
| { | |
| "name": "root", | |
| "value": 1, | |
| "children": [ | |
| { | |
| "name": "(root)", | |
| "value": 1, | |
| "children": [ | |
| { | |
| "name": "_handle.close", |
| #!/usr/bin/env python3 | |
| import httplib2 | |
| import apiclient | |
| from oauth2client.client import OAuth2WebServerFlow | |
| scopes = [ | |
| 'https://mail.google.com/', | |
| 'https://www.googleapis.com/auth/gmail.settings.basic', | |
| 'https://www.googleapis.com/auth/userinfo.profile', |
| // To store personal documents that really matter (such as tax reports, bank terms, | |
| // employment conditions...) you should opt for a cloud storage (Dropbox, Google Drive...). | |
| // Even if famous SaaS services might be safe enough to not make backups by ourselves, it | |
| // may be even safer to not rely on them and setup this short script for copying a Drive folder | |
| // into Dropbox. | |
| // To generate a Dropbox access token, please follow this guide: http://99rabbits.com/get-dropbox-access-token/ | |
| // Don't forget to setup a cronjob: | |
| // 1- Click on 'Edit' menu > 'Current project's triggers' |