Skip to content

Instantly share code, notes, and snippets.

@Awashyak
Awashyak / KeycloakAdminClientExample.java
Created January 29, 2025 06:33 — 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;
@Awashyak
Awashyak / instructon_to_swap_key_window.md
Last active May 12, 2024 07:55
Swapping keys on windows 10
  1. open regedit
  2. go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
  3. right click on the empty area (that shows when you click on Keyboard Layout)
  4. select new and then binary value
  5. change the name to Scancode Map and open it
  6. fill the 1st column with 0's (e.g. 00 00 00 00 00 00 00 00)
  7. for the 2nd column type 02 00 00 00 scan_code_to_map_to 00 00 scan_code_to_map_from where, scan_code_to_map_to and scan_code_to_map_from is the hex number of scan code of a key (e.g. 3A for caps lock) //google for the scan codechart