Skip to content

Instantly share code, notes, and snippets.

View khatwaniNikhil's full-sized avatar

Nikhil Khatwani khatwaniNikhil

View GitHub Profile
@khatwaniNikhil
khatwaniNikhil / javaMultiTreadingPart2.md
Created November 5, 2023 18:13 — forked from yclim95/javaMultiTreadingPart2.md
Java Multi-Threading Part II

#Java Multi-Threading Part II

##Lesson4 : Thread Pools

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/*
 * Thread Pools => Managing Lock Threads @ same time 
@khatwaniNikhil
khatwaniNikhil / javaMultiTreadingPart1.md
Created November 5, 2023 18:12 — forked from yclim95/javaMultiTreadingPart1.md
Java Multi-Threading Part I

#Java Multi-Threading Part I

##Lesson1 : Basic Threads ###1. Extends Thread

/*
 * Basic Threads
 * Run Concurently(Simultaneously)
 */
@khatwaniNikhil
khatwaniNikhil / commands.json
Created April 3, 2023 16:48 — forked from vjeffz/commands.json
A list of all the aws-cli command examples from https://docs.aws.amazon.com/cli/latest/reference/
This file has been truncated, but you can view the full file.
{
"acm": {
"AddTagsToCertificate": [
"aws acm add-tags-to-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 --tags Key=Admin,Value=Alice Key=Purpose,Value=Website "
],
"DeleteCertificate": [
"aws acm delete-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
],
"DescribeCertificate": [
"aws acm describe-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 "
@khatwaniNikhil
khatwaniNikhil / gist:2398f456d593a98eb5abf5ce08e42f39
Created March 5, 2021 09:34
Java Native memory leak analysis
Native Leak example 1
******************************************************************************
https://technology.blog.gov.uk/2015/12/11/using-jemalloc-to-get-to-the-bottom-of-a-memory-leak/
leak
1GB in java.util.zip.Inflater.inflateBytes -> inflate -> updatewindow.
solution
stopped the decompression of frontend assets by
@khatwaniNikhil
khatwaniNikhil / gist:147acdb23b99780b0a977dccf4246eee
Created March 5, 2021 09:30
Python Script - Calculate stack memory used by a Java process (made changes to https://github.com/apangin/jstackmem)
sudo python ./jstackmem.py 2495
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import bisect
import re
import subprocess
import sys
******************************************************************************************************************************************
async profiler
1 installation
https://github.com/jvm-profiling-tools/async-profiler
2 for memory profiling, install java debug symbols
https://www.javaadvent.com/2014/12/recompiling-the-java-runtime-library-with-debug-symbols.html
https://gist.github.com/khatwaniNikhil/694e44e7c939d96848b23afd5693b175
@khatwaniNikhil
khatwaniNikhil / debug_jdk.xml
Created February 14, 2021 07:05 — forked from cdman/debug_jdk.xml
Ant script to recompile the JDK runtime with full debug symbols
<project name="create rt_debug.jar" default="makejar" basedir=".">
<target name="init">
<property environment="env"/>
<property name="project.build" location="build"/>
<property name="project.src" location="${project.build}/src"/>
<property name="project.classes" location="${project.build}/classes"/>
<property name="project.dist" location="${project.build}/dist"/>
<path id="project.classpath">
<fileset dir="${env.JAVA_HOME}/jre/lib">
<include name="*.jar"/>
@khatwaniNikhil
khatwaniNikhil / README.md
Created May 4, 2018 13:23 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.