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/bash | |
| CONFIG_PATH="/path/to/config.ovpn" | |
| CRED_PATH="/path/to/credentials" | |
| PID_FILE="/tmp/openvpn.pid" | |
| LOG_FILE="/tmp/openvpn.log" | |
| function vpn_up() { | |
| if [[ -f "$PID_FILE" ]]; then | |
| echo "VPN already running (PID $(cat $PID_FILE))" |
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/bash | |
| BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
| JIRA_ID=$(echo "$BRANCH_NAME" | grep -oE '[A-Z]+-[0-9]+') | |
| COMMIT_MSG_FILE=$1 | |
| COMMIT_SOURCE=$2 | |
| if [[ "$COMMIT_SOURCE" == "merge" || "$COMMIT_SOURCE" == "squash" || "$COMMIT_SOURCE" == "rebase" ]]; then |
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 inspect | |
| from typing import Union | |
| from dataclasses import dataclass | |
| from uptime_kuma_api import UptimeKumaApi | |
| UPTIME_KUMA_URL = "[Redacted]" | |
| UPTIME_KUMA_USERNAME = "[Redacted]" | |
| UPTIME_KUMA_PASSWORD = "[Redacted]" |
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
| local keys = (redis.call('KEYS', '<PATTERN>')) | |
| local values = {} | |
| for _, key in ipairs(keys) do | |
| local value = redis.call('GET', key) | |
| table.insert(values, value) | |
| end | |
| return values |
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
| user www www; ## Default: nobody | |
| worker_processes 5; ## Default: 1 | |
| error_log logs/error.log; | |
| pid logs/nginx.pid; | |
| worker_rlimit_nofile 8192; | |
| events { | |
| worker_connections 4096; ## Default: 1024 | |
| } |
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 urllib, hashlib | |
| # Conf for pulling Gravatar Image | |
| EMAIL = u'youremail@example.com' | |
| DEFAULT_GRV_URL = u'http://www.example.com/default.jpg' | |
| GRV_SIZE = 120 | |
| # construct gravatar URL | |
| GRV_URL = "http://www.gravatar.com/avatar/" + hashlib.md5(EMAIL.lower().encode("utf-8")).hexdigest() + "?" | |
| GRV_URL += urllib.parse.urlencode({'d':DEFAULT_GRV_URL, 's':str(GRV_SIZE)}) |