Skip to content

Instantly share code, notes, and snippets.

View inspirit941's full-sized avatar

Donggeon Lee inspirit941

View GitHub Profile
package main
import (
"log"
"os"
"time"
"github.com/open-feature/open-feature-operator/apis/core/v1alpha1"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/dynamic/dynamicinformer"

Custom Choose File

Working on a custom choose file field with Javascript to control selected file content. Using states, if a file is selected, the field has a green color. If no file selected, it rolls back to default state.

A Pen by Donggeon Lee on CodePen.

License.

@inspirit941
inspirit941 / 23-04-23-aifactory-langchain-2.ipynb
Created April 24, 2023 04:27
23.04.23 - aifactory 김태영 - LangChain 시작하기 (2).ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@inspirit941
inspirit941 / 23-04-17-aifactory-langchain.ipynb
Created April 17, 2023 09:25
23.04.17. aifactory 김태영 - LangChain 시작하기.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@inspirit941
inspirit941 / org.keycloak.storage.UserStorageProviderFactory
Created April 2, 2023 11:22
resource/META_INF/services/org.keycloak.storage.UserStorageProviderFactory
com.witherview.keycloak.oauth.remoteuserstorage.RemoteUserStorageProviderFactory
package com.witherview.keycloak.oauth.account;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
public class AccountDTO {
@Getter @Setter
public static class LoginValidateDTO {
package com.witherview.keycloak.oauth.account;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
@Consumes(MediaType.APPLICATION_JSON)
public interface AccountApiService {
@GET
@Path("/oauth/user/{email}")
AccountDTO.ResponseLogin getUserDetails(@PathParam("email") String email);
package com.witherview.keycloak.oauth.remoteuserstorage;
import com.witherview.keycloak.oauth.account.AccountApiService;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.keycloak.component.ComponentModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.storage.UserStorageProviderFactory;
import org.springframework.beans.factory.annotation.Value;
package com.inspirit941.remoteuserstorageprovider;
import org.keycloak.component.ComponentModel;
import org.keycloak.credential.CredentialInput;
import org.keycloak.credential.CredentialInputValidator;
import org.keycloak.credential.UserCredentialStore;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;