Skip to content

Instantly share code, notes, and snippets.

@lotharschulz
lotharschulz / ghe-backup-senza-yaml
Created February 22, 2016 12:06
ghe backup sample senza.yaml file
# basic information for generating and executing this definition
SenzaInfo:
StackName: hello-world
Parameters:
- ImageVersion:
Description: "Docker image version of hello-world."
# a list of senza components to apply to the definition
SenzaComponents:
# this basic configuration is required for the other components
- Configuration:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1441892073456",
"Effect": "Allow",
"Action": [
"kms:Decrypt"
],
"Resource": [
# https://github.com/lotharschulz/akkahttp-playground/releases/tag/0.0.6-minikube-lb-ing-presentation-leipzig
# prerequsites: scala, sbt, docker, minikube, kubectl, local registry, project's docker images in local registry
kubectl create -f minikube-deployment-config.yaml
kubectl expose deployment akkahttpplayground-deployment --type="LoadBalancer" --port=8181 -target-port=8181
minikube service akkahttpplayground-deployment # opens browser window
minikube addons enable ingress
kubectl create -f minikube-ingress.yaml
echo "$(minikube ip) myminikube.info" | sudo tee -a /etc/hosts
# check the service
# http://www.lotharschulz.info/2018/05/06/kubeflow-jupyter-notebook-on-kubernetes
# Create a namespace for kubeflow deployment
NAMESPACE=kubeflow
# start kubernetes cluster using minikube
minikube start
# create the kubeflow namespace
kubectl create namespace ${NAMESPACE}
# ksonnet package versions
VERSION=v0.1.3
@lotharschulz
lotharschulz / lightroom_favourite_shortcuts.md
Last active July 21, 2018 08:21
my lightroom favourite shortcuts

my favourite lightroom shortcuts (mac)

  • dev module

    • previous button

      alt + cmd + v

    • sync button

@lotharschulz
lotharschulz / numberString2individualCharacters.kt
Last active August 5, 2018 17:15
Kotlin: sample code that converts individual characters of a string to Integers
fun main(args: Array<String>) {
val someText = "ABC1234567890"
for (i in (0 .. (someText.length-1))){
println(" number[$i]: ${someText[i]}")
println("(number[$i] is Char): ${(someText[i] is Char)}")
/* toInt return ascii dev code of a Character,
_not_ the Character as Int in case of numbers */
println(" number[$i].toInt(): ${someText[i].toInt()}")
println(" number[$i].toString().toIntOrNull(): " +
"${someText[i].toString().toIntOrNull()}")
@lotharschulz
lotharschulz / lotharschulz-hellogo:build.docker-cache–0.2.91 CVEs
Created October 5, 2018 20:40
lotharschulz/hellogo:build.docker-cache–0.2.91 CVEs identified with Clair and klar
╔════════╦══════════════════════════════╦═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ CVE ║ Found in ║
@lotharschulz
lotharschulz / docker images build, push, pull time
Created October 5, 2018 20:33
Docker base image sizes & push and pull times as of circleCi hellogodocker build 91
╔═════════════════════════════╦════════════════════════════╦═════════════════════════════════════════╦════════════════════════╦════════════╦═══════════════════════╦═══════════════════════════════════╦═════════════════════════════════════╗
║ base image ║ Docker build category ║ command ║ image build (circleCI) ║ image size ║ image size compressed ║ push to Dockerhub (from circleCI) ║ pull from Dockerhub (from circleCI) ║
╠═════════════════════════════╬════════════════════════════╬═════════════════════════════════════════╬════════════════════════╬════════════╬═══════════════════════╬═══════════════════════════════════╬═════════════════════════════════════╣
║ golang:1.11 ║ default ║ docker build ║ 3.025s ║ 783 MB ║ 299 MB ║ 4.618s ║ 21.271s ║
║ golang:1.11 ║ default ║ docker
@lotharschulz
lotharschulz / kotlin-null.md
Last active October 6, 2020 18:04
kotlin-null
mutation ArchiveRepository {
archiveRepository(input:{clientMutationId:"true",repositoryId:"[repositoryID]"}) {
repository {
isArchived,
description,
}
}
}