Skip to content

Instantly share code, notes, and snippets.

@tcotav
tcotav / dotbashrc.sh
Created March 31, 2017 16:08
dot-bashrc set kubernetes kubeconfig on login
#!/bin/bash
# add this to users .bashrc file -- remove the #!/bin/bash
#
# script that prompts user on login to select a kubernetes cluster as their current
#
# - we set an alias for kubectl which is kubectl --kubeconfig=<some config>
# - we create a different kubeconfig file in .kube for each context
#
declare -a KUBE_CONFIG_FILES
@bmaupin
bmaupin / open-source-sso.md
Last active March 30, 2026 10:55
Comparison of some open-source SSO implementations

⚠️ This is not maintained. Feel free to check comments and/or forks for more current options.

Background

This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management

Comparison

(Items in bold indicate possible concerns)

@btoueg
btoueg / main.py
Last active February 24, 2023 07:30
An example of symmetric encryption in python 2.7 using a single known secret key - utilizes cryptography library
# -*- encoding: utf-8 -*-
import os
import base64
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
backend = default_backend()
secret_key = base64.b64decode(
# generated randomly once, kept secret