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 / Dockerfile
Created June 20, 2024 02:54
Custom envoy docker with curl, grpcurl, tcpdump
# Use this to build a custom envoy image with tools like curl, grpcurl, tcpdump etc
FROM curlimages/curl:8.8.0
FROM envoyproxy/envoy:dev
# Run below if behind a firewall and you have your own sources for ubuntu apt repos
RUN \
sed -i "s@http://archive.ubuntu.com/ubuntu/@https://company.com/ubuntu/@g" /etc/apt/sources.list && \
sed -i "s@http://security.ubuntu.com/ubuntu/@https://company.com/ubuntu/@g" /etc/apt/sources.list && \
sed -i "s#https\{0,1\}://\(us\.\)\{0,1\}ports.ubuntu.com/ubuntu-ports/\{0,1\}#https://company.com/ubuntu-ports/#g" /etc/apt/sources.list && \
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade && \
apt-get clean && \
@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 .
@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: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 / docker_on_win10home.md
Last active October 10, 2020 09:27
Docker Desktop on Windows 10 Home
@rkbalgi
rkbalgi / build_envoy_vm.md
Last active October 10, 2020 09:25
Building envoyproxy on a VirtualBox VM (Ubuntu 19.10)

Building envoy on Windows

This is targeted for Windows users (who wish to build outside of a docker container - which BTW is still the preferred way to build the image)

sudo apt-get install build-essential
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v0.0.8/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel
@rkbalgi
rkbalgi / ubuntu19.10_virtualbox.md
Last active April 8, 2020 09:12
Setting up Ubuntu 19.10 server edition on VirtualBox (osboxes)

Ubuntu 19.10 on VirtualBox (Using osboxes server edition image)

I had few problems setting up Ubuntu 19.10 using a osbox image on my windows 10 (NAT mode). Hopefully, this gist will help those trying the same

Set up networking as NAT mode in Virtual Box

  • Attached Mode: NAT
  • Promiscuos Mode: Allow All
  • Cable Attached - Selected (Port forwarding if necessary - I included 22 as I work by ssh'ing into the box)

Figure out your network interface name

@rkbalgi
rkbalgi / custom_types.go
Last active July 11, 2024 12:41
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:11cc334798d6d9428cd07de695005ba3
Created February 23, 2019 17:45
Replace ID's in keycloak realm export JSON file (clone realm)
https://github.com/rkbalgi/keycloak-cli/blob/master/src/main/java/com/github/rkbalgi/apps/keycloak/IdReplacer.java
@rkbalgi
rkbalgi / pom.xml
Last active January 25, 2019 14:11
Generate and build swagger API client using maven
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<configuration>
<apiSources>
<apiSource>
<springmvc>true</springmvc>
<locations>
<location>com.example.resources.DemoResource</location>