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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Tweets</title> | |
<script src="http://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
<script type="text/javascript" src="http://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script> |
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
package main | |
import ( | |
"bufio" | |
"github.com/astaxie/beego" | |
"github.com/astaxie/beego/context" | |
"github.com/astaxie/beego/logs" | |
"github.com/ulule/limiter" | |
"github.com/ulule/limiter/drivers/store/memory" | |
"net" |
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 bash | |
set -euo pipefail | |
DOMAIN=$1 | |
SUB_DOMAIN="${2}.${DOMAIN}" | |
CF_ID=$3 | |
CF_KEY=$4 | |
IP= |
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 bash | |
set -euo pipefail | |
cd `dirname $0` | |
# lock it | |
PIDFILE="/tmp/$(basename "${BASH_SOURCE[0]%.*}.pid")" | |
exec 200>${PIDFILE} | |
flock -n 200 || ( echo "${BASH_SOURCE[0]} script is already running. Aborting . ." && exit 1 ) | |
PID=$$ |
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 bash | |
set -euo pipefail | |
cd `dirname $0` | |
# lock it | |
PIDFILE="/tmp/$(basename "${BASH_SOURCE[0]%.*}.pid")" | |
exec 200>${PIDFILE} | |
flock -n 200 || ( echo "${BASH_SOURCE[0]} script is already running. Aborting . ." && exit 1 ) | |
PID=$$ |
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
on idle | |
set vpnServiceName to "VPN NAME" | |
set connected to "" | |
delay 10 | |
try | |
set connected to do shell script "/usr/local/bin/kubectl get namespace --request-timeout 5s &> /dev/null && echo 1" | |
on error errorMessage number errorNumber | |
end try | |
log connected |
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
#!/bin/bash | |
set -e | |
#optional change working directory | |
DIR=${1-$(pwd)} | |
cd $DIR | |
USER="Github username" | |
TOKEN=$GITHUB_TOKEN |
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 bash | |
kubectl -n kube-system describe secret $( | |
kubectl -n kube-system get secret | \ | |
awk '/^cluster-admin-dashboard-sa-token-/{print $1}' | |
) | \ | |
awk '$1=="token:"{print $2}' |
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
version: "3.3" | |
services: | |
postgres: | |
image: postgres:latest | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: postgres | |
volumes: | |
- ./docker/containers/postgresql/data:/var/lib/postgresql/data | |
ports: |
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 bash | |
set -eo pipefail | |
READ_LINK=$([[ "$OSTYPE" == "darwin"* ]] && echo greadlink || echo readlink) | |
cd "$(dirname $(${READ_LINK} -f "${BASH_SOURCE[0]}"))/.." | |
IP=$(hcloud server list --selector "name=$1" --output noheader --output columns=IPV4) | |
echo Connecting to $1 IP: $IP |