Skip to content

Instantly share code, notes, and snippets.

///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS mavenCentral,sponge=https://repo.spongepowered.org/maven,jitpack=https://jitpack.io
//DEPS com.github.Minestom:Minestom:master-SNAPSHOT
import static java.lang.System.*;
import net.minestom.server.MinecraftServer;
public class server {
@edewit
edewit / script.md
Last active May 21, 2021 12:09
quick keycloak-nodejs-script

Example of how to admin keycloak

nodejs should be installed

Create a folder and node project:

mkdir keycloak-admin
cd keycloak-admin
npm init -y
const KcAdminClient = require('keycloak-admin').default;
const kcAdminClient = new KcAdminClient({
baseUrl: 'http://localhost:8180/auth',
realmName: 'master',
});
(async () => {
await kcAdminClient.auth({
username: 'admin',
<other>
<description>@emotion/memoize</description>
<locations>
<file>/node_modules/@emotion/memoize/dist/memoize.esm.js</file>
</locations>
<licenses>
<license>
<name>MIT</name>
<url>https://raw.githubusercontent.com/emotion-js/emotion/tree/master/next-packages/memoize/master/LICENSE</url>
</license>
/node_modules/react-dom/source.production.js
/node_modules/popper.js/dist/esm/popper.js
/node_modules/tippy.js/dist/tippy.chunk.esm.js
/node_modules/@patternfly/react-core/dist/esm/components/Select/Select.js
/node_modules/react-dropzone/dist/es/index.js
/node_modules/@patternfly/react-styles/css/layouts/Flex/flex.js
/node_modules/prop-types/factoryWithTypeCheckers.js
/node_modules/@patternfly/react-core/dist/esm/components/Wizard/Wizard.js
/node_modules/@emotion/stylis/dist/stylis.esm.js
/node_modules/create-emotion/dist/index.esm.js
diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
index 3b5f18141d..b45c5bb751 100644
--- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
+++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/my-resources-page/ResourcesTable.tsx
@@ -64,7 +64,7 @@ export class ResourcesTable extends AbstractResourcesTable<CollapsibleResourcesT
};
private fetchPermissions(resource: Resource, row: number): void {
- AccountService.doGet('resources/' + resource._id + '/permissions')
+ AccountService.doGet(`/resources/${resource._id}/permissions`)
import React, { useState, useEffect } from 'react';
export default function DataLoader(props) {
const [data, setData] = useState(undefined);
const [error, setError] = useState();
useEffect(() => {
setData(undefined);
const loadData = async () => {
try {
const result = await props.loader();
var bla = [
{
"additionalProperties": {},
"apiVersion": "apps.openshift.io/v1",
"kind": "DeploymentConfig",
"metadata": {
"additionalProperties": {},
"annotations": {
"template.alpha.openshift.io/wait-for-ready": "true"
},
{
"_index":"git",
"_type":"_doc",
"_id":"Adikq24BY3-_RA9P50FM",
"_score":1.0,
"_source":{
"hash":"05a09dbae2edf6149c38a92ae7ef4cc32032b273",
"date":"2019-02-02 14:39:43 +0100",
"message":"Declare the reactive streams dependency in the parent-build",
"refs":"",
agroal , Manyanda Chitimbo , manyanda.chitimbo@gmail.com , external
agroal , Sanne Grinovero , sanne@hibernate.org , Red Hat
agroal , Anamarija Talijanac , anamarija.medic@gmail.com , external
agroal , Guillaume Smet , guillaume.smet@gmail.com , Red Hat
agroal , Emmanuel Bernard , github@mel.emmanuelbernard.com , Red Hat
agroal , Gwenneg Lepage , gwenneg@gmail.com , external
agroal , Max Rydahl Andersen , max@xam.dk , Red Hat
agroal , Andy Damevin , ia3andy@gmail.com , Red Hat
agroal , George Gastaldi , gegastaldi@gmail.com , Red Hat
agroal , Luis Barreiro , lbbbarreiro@gmail.com , external