Skip to content

Instantly share code, notes, and snippets.

View rhuss's full-sized avatar

Roland Huß rhuss

View GitHub Profile
Receiving source from STDIN as archive ...
Pulling image "docker-registry.default.svc:5000/fuse-ignite/fuse-ignite-s2i@sha256:3c9f66a53c5e2651d77bffec13ad61619a50ede99c74ba690f243568c9faef95" ...
Preparing to build proj242508/i-db2db-1:69a82d11
Copying sources from "/tmp/s2i-build157931650/upload/src" to "/tmp/s2i-build157931650/upload/src"
Clean build will be performed
Running "assemble" in "proj242508/i-db2db-1:69a82d11"
==================================================================
Starting S2I Java Build .....
S2I source build for Maven detected
Using MAVEN_OPTS '-XX:+UseG1GC -XX:+UseStringDeduplication -Xmx310m'
@rhuss
rhuss / jolokia-cors.md
Last active October 10, 2018 10:24
Jolokia and CORS

Jolokia and CORS

[Jolokia][1] has configurable [CORS][2] support so that it plays nicely together with the Browser world when it comes to cross origin requests. However, Jolokia’s CORS support is not without gotchas. This gist explains how Jolokias CORS supports works, what are the issues and how I plan to solve them.

tldr; Jolokia CORS support is configured via jolokia-access.xml but has issues with authenticated requests which are tackled for the next release 1.3.0

CORS Primer

[CORS][3] (Cross Origin Resource Sharing) is a specification for browsers to allow controlled access for JavaScript code to locations which are different than the origin of the JavaScript code itself.

@rhuss
rhuss / console.md
Created April 5, 2019 21:46
CRDs with multiple version on OpenShift
$ kubectl get crd | grep crontab
crontabs.example.com                                                     2019-04-05T21:33:36Z

$ kubectl get crontab
NAME      AGE
new-tab   6m
old-tab   5m

$ kubectl get crontab old-tab -o yaml
brew install libvirt
sudo ln -s /opt/vagrant/embedded/include/ruby-2.0.0/{universal-darwin12.6.0,x86_64-darwin12.6.0}
ARCHFLAGS='-arch x86_64' \
CONFIGURE_ARGS="with-libvirt-include=/usr/local/include/libvirt:/opt/vagrant/embedded//include/ruby-2.0.0/universal-darwin12.6.0/ with-libvirt-lib=/usr/local/lib" \
vagrant plugin install vagrant-libvirt
#!/usr/bin/env bash
set -e
# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
# $ NO_COLOR=1 test.sh
NO_COLOR=${NO_COLOR:-""}
if [ -z "$NO_COLOR" ]; then
@rhuss
rhuss / knative-setup.sh
Created March 8, 2020 09:08
Knative Setup Script
#!/usr/bin/env bash
set -e
# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
# $ NO_COLOR=1 test.sh
NO_COLOR=${NO_COLOR:-""}
if [ -z "$NO_COLOR" ]; then
@rhuss
rhuss / Dockerfile
Last active June 22, 2020 21:33
Restic + Rclone for ARM
FROM golang:1.13.10-buster AS builder
ARG VERSION_RESTIC=v0.9.6
ARG VERSION_RCLONE=v1.51.0
WORKDIR /opt
RUN apt-get update \
&& apt-get install -y \
git \
@rhuss
rhuss / execute_groovy_jenkins_sample.groovy
Last active August 12, 2020 19:09
How to execute some shell scripting on Groovy with environment variables and redirection
def exec(cmd) {
println cmd
def process = new ProcessBuilder([ "sh", "-c", cmd])
.directory(new File("/tmp"))
.redirectErrorStream(true)
.start()
process.outputStream.close()
process.inputStream.eachLine {println it}
process.waitFor();
return process.exitValue()
@rhuss
rhuss / alpine-jre-8
Last active January 3, 2021 13:03
The Holy Grail of a Minimal, Headless, OpenJDK JRE 8
# Build for 206 MB JRE 1.8.0_60 (192 MB in size) with Alping and glibc
FROM alpine:3.2
ENV JRE=jre1.8.0_60 \
JAVA_HOME=/opt/jre
# That's the an EA from OpenJDK.net
# Courtesy to https://github.com/frol/docker-alpine-oraclejdk8 from where the setup of glibc is borrowed