Skip to content

Instantly share code, notes, and snippets.

View rkbalgi's full-sized avatar
🏠
Working from home

Raghavendra Balgi rkbalgi

🏠
Working from home
View GitHub Profile
@rkbalgi
rkbalgi / docker_on_win10home.md
Last active October 10, 2020 09:27
Docker Desktop on Windows 10 Home
@rkbalgi
rkbalgi / gist:2b605c86a4d50def73f9aced5619396b
Created October 3, 2018 04:50
Direct Access Grants (Resource Owner Password Flow) with Spring Boot and Keycloak
This gist describes the process of setting up direct grant access (oauth2 resource owner password flow) with keycloak and spring boot. We'll follow the
below steps -
1. Install keycloak - there are plenty of examples out there (even a docker image)
2. Create a demo realm and create a client within the demo realm with the settings as -
client-protocol: openid-connect, access-type: confidential, (implicit-flow+direct-access-grant+service-accounts)=enabled
3. Create 2 roles - developer and admin within the demo realm
4. Create 2 users - one with developer role and other with admin (Ensure that user is enabled, there are no "Required User Actions" and that the password has been reset (in the credentials tab)
@rkbalgi
rkbalgi / gist:9ac7de4924d53d038454413b37e7a125
Created April 21, 2021 19:41
Timeout Error when using AWS Java Lambda timeout error (via CDK)
If you're facing this error..
(????-d8ba0c577450) Lambda execution failed with status 200 due to customer function error: 2021-04-2... 593a3a89-???? Task timed out after 10.01 seconds. Lambda request id: ??-????-914d
By default, if you create a lambda using console, the default memory size is 512MB, if you create by AWS CDK it is 128MB!
try using `.memorySize(512)` on the lambda definition!
@rkbalgi
rkbalgi / gist:183a113e946dd9f8360e774dcf17a3db
Last active March 2, 2022 19:12
JDBC_PING with keycloak and postgresql on AWS Fargate
In your effort of implementing standalone-ha with keycloak postgresql using JDBC_PING you will stumble upon many sites that define
the table structure for jgroupsping and the right one goes like this -
CREATE TABLE IF NOT EXISTS JGROUPSPING (
own_addr varchar(200) NOT NULL,
cluster_name varchar(200) NOT NULL,
ping_data BYTEA,
constraint PK_JGROUPSPING PRIMARY KEY (own_addr, cluster_name)
);
@rkbalgi
rkbalgi / custom_types.go
Last active May 15, 2022 00:07
Using custom types with cel-go
package test
//A very simple example of using user defined structures with instance functions with cel-go
import (
"github.com/google/cel-go/cel"
"github.com/google/cel-go/checker/decls"
"github.com/google/cel-go/common/types"
"github.com/google/cel-go/common/types/ref"
"github.com/google/cel-go/common/types/traits"
@rkbalgi
rkbalgi / gist:13e9d3468fa13004bc0640c57ab62352
Created April 13, 2022 06:58
Debugging GRPC Go with Logging ENV variables
Use these ENV variables -
GRPC_GO_LOG_SEVERITY_LEVEL=info;GRPC_GO_LOG_VERBOSITY_LEVEL=99;GODEBUG=http2debug\=2
@rkbalgi
rkbalgi / gist:1f75510904b12fc023bc9a7cbc79727f
Created November 24, 2022 15:59
Multi Arch builds with docker
docker buildx build --builder=mybuilder --push --platform linux/arm64,linux/amd64 --tag rkbalgi/isosim:latest .