user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
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
| function getIP(host, recordType) { | |
| // Specify record type as per described here: https://en.wikipedia.org/wiki/List_of_DNS_record_types | |
| // For example, 'A', 'AAAA', 'NS', etc... | |
| // So your Google Sheets formula would be =getIP("www.example.com", "A") | |
| var url = "https://dns.google.com/resolve?name=" + host + "&type=" + recordType; | |
| var json = UrlFetchApp.fetch(url); | |
| var response = JSON.parse(json); | |
| var answer = response.Answer; | |
| var ip = ""; | |
| if (typeof answer != "undefined") { |
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/sh | |
| # based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
| # delete all evicted pods from all namespaces | |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff state from all namespaces | |
| kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
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 | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon | |
| maxconn 2048 |
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 | |
| # Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://www.cloudflare.com/a/account/my-account | |
| # Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit | |
| # Step 2: Create an A record on Cloudflare with the subdomain you chose | |
| # Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created. | |
| # Fill in ZONE_ID and REC_ID below | |
| # This step is optional, but will save you 2 requests every time you this script | |
| # Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating. | |
| # Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output |
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/sh | |
| # chkconfig: 2345 99 01 | |
| # description: SoftEther VPN Server | |
| DAEMON=/usr/local/vpnserver/vpnserver | |
| LOCK=/var/lock/subsys/vpnserver | |
| SERVER_IP=[SERVER_IP] | |
| test -x $DAEMON || exit 0 | |
| case "$1" in | |
| start) | |
| $DAEMON start |