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 /
Created Aug 26, 2019
How to update Wordpress URLs in MySQL
ruanbekker /
Created Aug 20, 2019
Fix RaspberryPi Locale Issue
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
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
ruanbekker /
Last active Jul 2, 2019
Setup a 3 Node MongoDB Replica Set
sudo mkdir -p /var/mongodb/db/{1,2,3}
sudo mkdir -p /var/mongodb/pki
openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile
chmod 600 /var/mongodb/pki/m103-keyfile
sudo chown vagrant:vagrant -R /var/mongodb
ruanbekker /
Created Jul 2, 2019
Setup Vagrant and Virtualbox on Mac
brew update
brew tap caskroom/cask 
brew search virtualbox
brew cask info virtualbox
brew cask install virtualbox
brew cask install vagrant
brew cleanup 
ruanbekker / golang_split_strings.go
Last active Jun 29, 2019
Golang: Split strings by character
View golang_split_strings.go
package main
import (
func main() {
for _, envs := range os.Environ() {
ruanbekker /
Created Jun 23, 2019
Generate Gamescores to DynamoDB from Blogpost
# from blogpost:
# -
import boto3
import time
import random
import datetime
client = boto3.Session(region_name='eu-west-1', profile_name='test').client('dynamodb')
# dynalite
# client = boto3.Session(region_name='eu-west-1').client('dynamodb', aws_access_key_id='', aws_secret_access_key='', endpoint_url='http://localhost:4567')
ruanbekker /
Created Jun 21, 2019
Authenticate AWS Elasticsearch Requests with Requests and RequestsAws4Auth
import boto3
import json
import requests
from requests_aws4auth import AWS4Auth
host = ''
region = 'eu-west-1'
service = 'es'
headers = {'Content-Type': 'application/json'}
You can’t perform that action at this time.