Skip to content

Instantly share code, notes, and snippets.

View BarDweller's full-sized avatar

Ozzy Osborne BarDweller

  • Montreal, Canada
View GitHub Profile
@BarDweller
BarDweller / setup_minikube.sh
Last active March 11, 2020 05:40
Minikube setup for local appsody usage...
#!/bin/bash
K8S_VERSION=v1.15.4
check_version()
{
version=$(echo $1 | sed -n 's/^[^0-9]*\([0-9.]\{1,\}\).*$/\1/p' )
minimum=$2
winner=$(echo -e "$version\n$minimum" | sed '/^$/d' | sort -t . -k1,1n -k2,2n -k3,3n | tail -1)
if [ "$winner" = "$version" ]; then
@BarDweller
BarDweller / connector.scad
Last active February 27, 2023 13:56
Configurable Tent pole coupler in OpenSCAD
poleradius = 9/2; //radius of pole
socketdepth = 15; //depth required for pole socket (note: not absolute due to ball join)
totalplugsize = 20; //exterior depth of pole corner
wallthick = 3; //thickness for walls
joinangle = 120; //angle to join two connectors at.
smoothness = 64; //number of faces for cylinder/sphere.
addfrictionfit = true; //set false if friction fit extra is not required.
@BarDweller
BarDweller / jwt oauth2 filter
Last active April 28, 2017 19:27
An attempt at a spring oauth2 / jwt filter that expects a jwt as the access token, and populates the authentication / user details from the jwt info.
private Filter ssoFilter() {
OAuth2ClientAuthenticationProcessingFilter appidFilter = new OAuth2ClientAuthenticationProcessingFilter(
"/login/appid");
OAuth2RestTemplate appidTemplate = new OAuth2RestTemplate(appid(), oauth2ClientContext);
appidFilter.setRestTemplate(appidTemplate);
DefaultTokenServices tokenServices = new DebugTokenServices();
try {