Skip to content

Instantly share code, notes, and snippets.

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

Sanjay Rawat RawSanj

🏠
Working from home
View GitHub Profile
@RawSanj
RawSanj / docker-compose.yml
Created May 17, 2024 12:40
Keycloak Setup with Traefik backed by Postgres and CloudDBViewer
name: keycloak
services:
# Traefik Reverse Proxy for routing various applications
reverse-proxy:
image: traefik:v2.10.5 # The official Traefik docker image
container_name: traefik
restart: unless-stopped
labels:
- traefik.http.routers.proxy.rule=Host(`proxy.docker.localhost`)
- traefik.http.routers.proxy.tls=false
@RawSanj
RawSanj / docker-compose.yml
Created May 10, 2022 14:17
Traefik Reverse Proxy and Monitoring Stack for Docker containers
version: '3.5'
services:
# Traefik Reverse Proxy for routing various applications
reverse-proxy:
image: traefik:v2.6.6 # The official Traefik docker image
restart: unless-stopped
labels:
- traefik.http.routers.proxy.rule=Host(`proxy.docker.localhost`)
FROM amazonlinux:latest AS graalvm
ENV LANG=en_US.UTF-8
RUN yum install -y gcc gcc-c++ libc6-dev zlib1g-dev curl bash zlib zlib-devel zlib-static zip tar gzip
RUN curl -4 -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.2.0/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz -o /tmp/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz
RUN tar -zxf /tmp/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz -C /tmp && mv /tmp/graalvm-ce-java11-21.2.0 /usr/lib/graalvm
RUN rm -rf /tmp/*
RUN /usr/lib/graalvm/bin/gu install native-image
CMD ["/usr/lib/graalvm/bin/native-image"]
ENV PATH=/usr/lib/graalvm/bin:${PATH}
FROM graalvm AS builder
@RawSanj
RawSanj / .bashrc
Created September 19, 2019 13:15
Dot Files
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@RawSanj
RawSanj / Flood data to fraudulent website
Last active August 9, 2019 09:43
docker-compose.yml file to crash/post random data to www.naukriwayindia.com fraudulent website
# Download the docker-compose.yml file
curl -LO https://gist.githubusercontent.com/RawSanj/83bd616367cd7d17d2f65b5902db6869/raw/84ad35e9ca72a12af466a61cb14a6481d82caf8a/docker-compose.yml
# Run containers in docker-compose mode. Starts 1 containers
docker-compose up -d
docker-compose scale load-crash-site=10 # Scale to 10 Containers
# OR
# Run containers in docker swarm mode. Starts 5 containers.
@RawSanj
RawSanj / docker-compose.yml
Last active June 23, 2019 19:27
Spring Boot App backed by MongoDB
version: '3.2'
services:
mongodb:
image: 'bitnami/mongodb:4.0'
ports:
- "27017:27017"
environment:
- MONGODB_ROOT_PASSWORD=MongoDBRootPassword
@RawSanj
RawSanj / jhipster-realm.json
Created April 27, 2019 13:13
Jhipser KeyCloak Config
{
"id": "jhipster",
"realm": "jhipster",
"notBefore": 0,
"revokeRefreshToken": false,
"refreshTokenMaxReuse": 0,
"accessTokenLifespan": 300,
"accessTokenLifespanForImplicitFlow": 900,
"ssoSessionIdleTimeout": 1800,
"ssoSessionMaxLifespan": 36000,
@RawSanj
RawSanj / keybase.md
Created March 15, 2019 17:33
Keybase proof

Keybase proof

I hereby claim:

  • I am rawsanj on github.
  • I am rawsanj (https://keybase.io/rawsanj) on keybase.
  • I have a public key ASDP4qIEhmy6kLun17J5ZbTjt0dyfO7t8Dxc0OhhFIFJGgo

To claim this, I am signing this object:

@RawSanj
RawSanj / make-all.sh
Created January 18, 2019 15:08
Run maven commands on all Maven Projects inside a directory
#!/usr/bin/env bash
#Set the root directory
RootProjectDirectory=`pwd`
echo "Making all Maven Projects under '"${RootProjectDirectory}"' directory"
for project in `find . -name "pom.xml"`;
do
cd "${project/pom.xml/}";
$@;
@RawSanj
RawSanj / native-mem-tracking.md
Created December 7, 2018 05:16 — forked from prasanthj/native-mem-tracking.md
Native memory tracking in JVM

Enable native memory tracking in JVM by specifying the following flag

-XX:NativeMemoryTracking=detail

Know the <PID> of the java process

jps

To print ps based RSS

ps -p <PID> -o pcpu,rss,size,vsize

To print native memory tracking summary