Skip to content

Instantly share code, notes, and snippets.

@dieterrosch
dieterrosch / letsencrypt-deployment.yaml
Last active November 1, 2016 02:02
LetsEncrypt Kubernetes deployment
#Once this is deployed, you need to run:
#kubectl exec -ti letsencrypt-595800129-3v7qw ./fetch_certs.sh
#and then
#kubectl exec -ti letsencrypt-595800129-3v7qw ./save_certs.sh
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: letsencrypt
labels:
app: letsencrypt
@dieterrosch
dieterrosch / backup_all_docker_images.sh
Last active August 11, 2023 19:48
A bash script to backup all docker images to files
#!/usr/bin/sh
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <backup_dir>"
exit
fi
destination=$1
if ! type "pv" > /dev/null; then
echo 'pv' command not found on your system, install it to get a nice progress indicator...
else
@dieterrosch
dieterrosch / IntegrationTest.java
Created March 23, 2017 10:38
Arquillian error
package co.za.turfsport.feeds.betgenius.splittermapper.MyTests;
import co.za.turfsport.feeds.betgenius.splittermapper.IntegrationTestCategory;
import io.fabric8.kubernetes.client.KubernetesClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.experimental.categories.Category;
/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/java -Dmaven.multiModuleProjectDirectory=/home/dieter/data/sandbox/turfsport/turfsport-main/development/microservices/feeds/betgenius-splittermapper-node/feeds-bg-splitmap-main -Dmaven.home=/usr/share/java/maven -Dclassworlds.conf=/usr/share/java/maven/bin/m2.conf -Didea.launcher.port=7532 -Didea.launcher.bin.path=/home/dieter/idea-IC-163.11103.6/bin -Dfile.encoding=UTF-8 -classpath /usr/share/java/maven/boot/plexus-classworlds-2.5.2.jar:/home/dieter/idea-IC-163.11103.6/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.3.3 verify -P nexus
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for co.za.turfsport:feeds-bg-splitmap-main:jar:4.8.0-RELEASE
[WARNING] 'profiles.profile[create-release-version].plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.codehaus.mojo:versions-maven-plugin @ c
@dieterrosch
dieterrosch / ubuntu_toolchain.sh
Created July 13, 2017 20:13
Default install for my ubuntu installations
#!/bin/bash
# ======================================================================================================
#Software packages installed using apt-get
apt_packages="terminator python2.7 python-pip wget curl vim vim-gnome vagrant build-essential krusader kdiff3"
# linux-image-extra-$(uname -r) linux-image-extra-virtual google-chrome-stable" # docker-engine"
#Uncomment the below line to install Virtualbox
vbox_images="virtualbox vde2 virtualbox-guest-additions-iso"
@dieterrosch
dieterrosch / create_go_package.sh
Created August 25, 2019 10:10
Given a source directory that contains a go package, create a go module that is hostable on a regular HTTP server (in this case an S3 bucket)
#!/usr/bin/env bash
# Given a directory containing a Go module, converts it to a
# package in the format required to be hosted on standard HTTP server
#!/bin/bash
if [ $# -ne 6 ]
then
echo "Usage: $0 <source_directory> <output_directory> <slug> <package> <version> <S3_bucket_name"
echo "Eg: $0 my_code_pkg/ output_dir example.com mymodule \"1.0.0\" my-bucket"
exit 1
fi