Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Armel Soro rm3l

:octocat:
View GitHub Profile
View nodejs_for_odo.Dockerfile
FROM quay.io/phmartin/node:17
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD [ "node", "server.js" ]
@rm3l
rm3l / mock-google-services.json
Created May 12, 2022
mock-google-services.json from firebase/quickstart-android
View mock-google-services.json
{
"project_info": {
"project_id": "mockproject-1234",
"project_number": "123456789000",
"name": "FirebaseQuickstarts",
"firebase_url": "https://mockproject-1234.firebaseio.com"
},
"client": [
{
"client_info": {
@rm3l
rm3l / git-filter-repo-change-commit-email.sh
Created May 1, 2022
git-filter-repo - changing author and committer email in multiple commits
View git-filter-repo-change-commit-email.sh
#!/bin/sh
# Install git-filter-repo, as suggested by git docs: https://git-scm.com/docs/git-filter-branch#_warning
git filter-repo --commit-callback '
old_email = b"your-old-email@example.com"
correct_name = b"Your Correct Name"
correct_email = b"your-correct-email@example.com"
if commit.committer_email == old_email :
View helper_dev.diff
diff --git a/tests/helper/helper_dev.go b/tests/helper/helper_dev.go
index 00cd1c08c..54aed03cd 100644
--- a/tests/helper/helper_dev.go
+++ b/tests/helper/helper_dev.go
@@ -1,10 +1,16 @@
package helper
import (
+ "fmt"
+ "os/exec"
View devfile-with-container-component-command.yaml
schemaVersion: 2.0.0
metadata:
name: java-quarkus
version: 1.1.0
website: https://quarkus.io
displayName: Quarkus Java
description: Quarkus with Java
icon: https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg
tags: ['Java', 'Quarkus']
projectType: 'quarkus'
View One Liner to Download the Latest Release from Github Repo.md
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@rm3l
rm3l / devfile.yaml
Created Mar 29, 2022
Devfile with image with no dockerfile buildContext field set
View devfile.yaml
schemaVersion: 2.2.0
metadata:
language: javascript
name: devfile-nodejs-deploy
projectType: nodejs
variables:
CONTAINER_IMAGE: localhost:5000/devfile-nodejs-deploy:latest
commands:
- id: install
exec:
@rm3l
rm3l / delete-local-k8s-cluster.sh
Created Feb 27, 2022
Convenience script to delete a local Kubernetes cluster installed via the 'create-local-k8s-cluster.sh' script. See https://gist.github.com/rm3l/f571fc462efe32dddf5a7b862e633134
View delete-local-k8s-cluster.sh
#!/bin/bash
set -o errexit
reg_name='local-registry'
cluster_name=${1:-local-k8s-cluster}
echo -n "Enter yes or no to delete cluster '$cluster_name' : "
read -r do_delete_cluster
do_delete_cluster="$(echo "${do_delete_cluster}" | tr '[:upper:]' '[:lower:]')"
if [ "$do_delete_cluster" == yes ]; then
@rm3l
rm3l / create-local-k8s-cluster.sh
Last active Sep 21, 2022
Convenience script to install a local Kubernetes cluster (based on KinD) ang a local registry. Requires kind, kubectl, helm and yq commands.
View create-local-k8s-cluster.sh
#!/bin/sh
set -o errexit
set -x
# create registry container unless it already exists
registry_name='local-registry'
registry_port='5000'
running="$(docker container inspect -f '{{.State.Running}}' "${registry_name}" 2>/dev/null || true)"
if [ "${running}" != 'true' ]; then
registry_image_tag='2.7.1'
@rm3l
rm3l / keycloak_claims-not-imported-using-oidc-idp-mappers.patch
Last active Nov 29, 2021
Patch for Keycloak bug : [OIDC] Access Token claims not imported using Identity Provider Attribute Importer Mappers. See https://github.com/keycloak/keycloak/discussions/8462
View keycloak_claims-not-imported-using-oidc-idp-mappers.patch
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) {