Skip to content

Instantly share code, notes, and snippets.


Jon Keam jkeam

View GitHub Profile
jkeam / create-kafka-cluster.yaml
Created Aug 22, 2022
AMQ Streams create Kafka
View create-kafka-cluster.yaml
kind: Kafka
name: my-cluster
app: my-app
namespace: openshift-operators
View odo-dotnet-demo.txt
# Get odo for linux
$ curl -OL && mv odo-linux-amd64 odo && chmod u+x odo
$ export PATH=$PATH:$(pwd)
$ odo version
# Use git to check out the .NET Core application
$ git clone
$ cd s2i-dotnetcore-ex/app
$ git checkout dotnetcore-3.1
jkeam / Dockerfile-forever
Created Aug 8, 2022
Dockerfile to run container forever
View Dockerfile-forever
USER nobody
ENTRYPOINT ["tail", "-f", "/dev/null"]
jkeam /
Last active Aug 3, 2022
Drop all forwarded headers
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.context.annotation.Bean;
public ForwardedHeaderFilter disabledForwardedHeaderFilter() {
ForwardedHeaderFilter filter = new ForwardedHeaderFilter();
return filter;
jkeam /
Last active Aug 2, 2022
Quarkus Command Examples
# standard api
quarkus create app --verbose --refresh --maven --java=11 --package-name=io.keam \
--extensions=resteasy-reactive,resteasy-reactive-jackson,hibernate-orm-rest-data-panache,jdbc-postgresql,smallrye-jwt,smallrye-jwt-build \
--app-config=quarkus.datasource.db-kind=postgresql,quarkus.datasource.username=root,quarkus.datasource.password=root,quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/todo_app,quarkus.hibernate-orm.database.generation=drop-and-create \
# reactive api
# quarkus create app --verbose --refresh --maven --java=11 --package-name=io.keam \
jkeam /
Created Jul 19, 2022
How to enable insecure websockets in Firefox.
  1. Go to this url in your Firefox browser: about:config
  2. Then search for network.websocket.allowInsecureFromHTTPS and toggle it on
jkeam /
Last active Aug 25, 2022
ASP.NET Core 6 Blazor App Workshop - Instructor Live Readme

ASP.NET Core 6 Blazor App Workshop - Instructor Live Readme

Live workshop notes and flow are below. Use this as a reference day of the workshop to make sure you hit all the main points.


Explain application here

Developer Setup

  1. Setup Developer Workspace (30min)
jkeam /
Last active Aug 25, 2022
ASP.NET Core 6 Blazor App Workshop - Instructor Prep Readme

ASP.NET Core 6 Blazor App Workshop - Instructor Prep Readme

These are the instructor notes for giving a hands-on workshop specifically for .NET developers doing cloud native development on OpenShift. OpenShift tends to have lots of enablement material around Java, Go, Python, and Ruby but not so much for .Net; even though it is a first class citizen on the platform. Microsoft has done a great job around making .Net Core 5 and after being cross platform and Linux friendly. The development experience using .NET with its live reloading makes it wonderful to use and being able to get that same experience even though the application is running on OpenShift and not a developer's local laptop is a critical part of cloud native development. Being able to utilize the resources of the cloud for development and for cloud deployment, but not sacrificing on the development experience is essential.

These notes are for an instructor that wants to prepare and run this workshop. This workshop gives developers first ha

jkeam / git-credentials-secret.yaml
Last active Jul 19, 2022
Secret needed by Dev Spaces for GitHub access.
View git-credentials-secret.yaml
apiVersion: v1
kind: Secret
name: git-credentials-secret
labels: 'true' 'true'
annotations: /etc/secret
jkeam / validation-tests.cs
Created Jul 15, 2022
Validation tests to add for todo application, found here:
View validation-tests.cs
// Snippet to add to TodoListTest/Tests.cs
public void NotAllowCreateShortTodo()
using (var scope = testContext.Services.CreateScope())
var service = scope.ServiceProvider.GetRequiredService<IDbContextFactory<DatabaseContext>>();
using (var context = service.CreateDbContext())