Skip to content

Instantly share code, notes, and snippets.

View rm3l's full-sized avatar

Armel Soro rm3l

View GitHub Profile
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@rm3l
rm3l / install__rm3l_ghost-export-to-s3__helm_chart.sh
Last active March 13, 2021 22:21
Leveraging Kubernetes CronJobs for automated backups of a headless Ghost blog to AWS S3
helm repo add rm3l https://helm-charts.rm3l.org
helm install my-ghost-export-to-s3 rm3l/ghost-export-to-s3 \
--version 0.9.0 \
--set ghost.apiBaseUrl="https://my.ghost.blog/ghost" \
--set ghost.username="my-ghost-username" \
--set ghost.password="my-ghost-password" \
--set aws.accessKeyId="my-aws-access-key-id" \
--set aws.secretKey="my-aws-secret-key" \
--set aws.s3.destination="s3://path/to/my/s3-export.json" \
--set cronJob.schedule="@daily"
apiVersion: v1
kind: ConfigMap
metadata:
name: ghost-export-k8s-to-s3-configmap
data:
GHOST_URL: https://my.ghost.blog.com/ghost
S3_DESTINATION: s3://my-s3-bucket/folder/my.ghost.blog.com.export.json
kubectl create configmap ghost-export-k8s-to-s3-configmap \
--from-literal GHOST_URL="https://my.ghost.blog.com/ghost" \
--from-literal S3_DESTINATION="s3://my-s3-bucket/folder/my.ghost.blog.com.export.json"
apiVersion: v1
kind: Secret
metadata:
name: ghost-export-k8s-to-s3-secret
stringData:
AWS_ACCESS_KEY_ID: my-aws-access-key-id
AWS_SECRET_ACCESS_KEY: my-aws-secret-key
GHOST_AUTH_PASSWORD: my-ghost-password
GHOST_AUTH_USERNAME: my-ghost-user
kubectl create secret generic ghost-export-k8s-to-s3-secret \
--from-literal GHOST_AUTH_USERNAME="my-ghost-user" \
--from-literal GHOST_AUTH_PASSWORD="my-ghost-password" \
--from-literal AWS_ACCESS_KEY_ID="my-aws-access-key-id" \
--from-literal AWS_SECRET_ACCESS_KEY="my-aws-secret-key"
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: ghost-s3-export-cron-job
spec:
schedule: "@daily"
concurrencyPolicy: Forbid
jobTemplate:
spec:
ttlSecondsAfterFinished: 300
#!/usr/bin/env lua
local socket = require("socket")
local use_ssl, ssl = pcall(require, "ssl")
local Blynk = require("blynk.socket")
local Timer = require("timer")
assert(#arg >= 1, "Please specify Auth Token")
local auth = arg[1]
@rm3l
rm3l / keycloak_claims-not-imported-using-oidc-idp-mappers.patch
Last active November 29, 2021 10:38
Patch for Keycloak bug : [OIDC] Access Token claims not imported using Identity Provider Attribute Importer Mappers. See https://github.com/keycloak/keycloak/discussions/8462
diff --git a/services/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java b/services/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
index b6b15b06e5..4ecca0c5cb 100755
--- a/services/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
+++ b/services/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
@@ -63,13 +63,6 @@ public class KeycloakOIDCIdentityProvider extends OIDCIdentityProvider {
return new KeycloakEndpoint(callback, realm, event);
}
- @Override
- protected void processAccessTokenResponse(BrokeredIdentityContext context, AccessTokenResponse response) {
@rm3l
rm3l / create-local-k8s-cluster.sh
Last active April 25, 2023 07:11
Convenience script to install my local Kubernetes KinD cluster, with the following resources (a local image registry, a Devfile registry). Requires kind, docker, kubectl, helm, curl, openssl, operator-sdk, yq commands.
#!/bin/sh
set -o errexit
set -x
#alias docker=podman
#KIND_EXPERIMENTAL_PROVIDER=podman
cluster_name=${1:-local-k8s-cluster}
registry_port=${2:-5000}