Skip to content

Instantly share code, notes, and snippets.

View jachinte's full-sized avatar

Miguel Jimenez jachinte

View GitHub Profile
@jachinte
jachinte / docker-compose-update.sh
Last active March 29, 2022 04:44
Update a docker-compose deployment using github releases (use in combination with crontab)
#!/bin/sh
#
# Usage: sh ./docker-compose-update.sh github_username/github_repository
#
# From: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
get_latest_release() {
GITHUB_REPO="$1"
curl --silent "https://api.github.com/repos/$GITHUB_REPO/releases/latest" \
| grep '"tag_name":' \
@jachinte
jachinte / KeycloakAdminClientExample.java
Created December 19, 2020 15:34 — forked from thomasdarimont/KeycloakAdminClientExample.java
Simple example for creating a User with Keycloaks Admin Client - with credentials, custom roles, and user attributes
package de.tdlabs.keycloak.client;
import java.util.Arrays;
import java.util.Collections;
import javax.ws.rs.core.Response;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
@jachinte
jachinte / KeycloakAdminClientExample.java
Created April 12, 2020 09:15 — forked from thomasdarimont/KeycloakAdminClientExample.java
Using Keycloak Admin Client to create user with roles (Realm and Client level)
package demo.plain;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.CreatedResponseUtil;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.admin.client.resource.RealmResource;
import org.keycloak.admin.client.resource.UserResource;
import org.keycloak.admin.client.resource.UsersResource;
import org.keycloak.representations.idm.ClientRepresentation;
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->