Skip to content

Instantly share code, notes, and snippets.


Ruan Bekker ruanbekker

Block or report user

Report or block ruanbekker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ruanbekker /
Last active Aug 15, 2019
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
ruanbekker /
Created Dec 10, 2017
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
ruanbekker /
Last active Aug 7, 2019
Install a 3 Node Kubernetes Cluster on Ubuntu 16

Master: Dependencies

apt update && apt upgrade -y
curl | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial main
ruanbekker /
Last active Jul 30, 2019
Basic Boto3 Code for AWS to Set the Profile Name
import boto3
# setting region, profile from credential provider
session = boto3.Session(
# declare ec2
ec2 = session.client('ec2')
ruanbekker /
Created Jul 26, 2017
Python SMTP Mailer using Amazon SES (smtplib)
import sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
name = "Ruan"
from_address = ""
to_address = ""
subject = "Test"
ruanbekker /
Created Jan 31, 2018
Getting Secrets from SSM using GetParameter Example with Python and Boto3

Bash Environment Example with SSM to get Parameter Values using GetParameter:

IAM Policy:

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "Stmt1517398919242",
ruanbekker /
Created Jun 7, 2017
Python Flask Show Client IP
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/ip', methods=['GET'])
def name():
return request.environ.get('HTTP_X_REAL_IP', request.remote_addr)
#return jsonify({'ip': request.remote_addr}), 200
#return jsonify({'ip': request.environ['REMOTE_ADDR']}), 200
ruanbekker /
Last active Jul 11, 2019
Minio Events with Bucket Notifications
ruanbekker /
Last active Jul 8, 2019
Traefik with SSL + Portainer on Docker Swarm Repro

Traefik and Portainer on Docker Swarm with Letsencrypt

Reproducing a Traefik with SSL and Portainer setup on a 2 Node Docker Swarm

Install Docker:

Install Docker on both nodes with a Bootstrap Script:

$ curl | bash
You can’t perform that action at this time.