Skip to content

Instantly share code, notes, and snippets.

View EugeneChung's full-sized avatar
🐢
Steady and firm

Eugene Chung EugeneChung

🐢
Steady and firm
View GitHub Profile
@EugeneChung
EugeneChung / heap_dump_analysis.md
Created July 22, 2022 09:58 — forked from DaveyDevOps/heap_dump_analysis.md
Large Java Heap Dump Analysis

Just wanted to document the steps taken in a specific scenario. There are plenty of references covering the different parts (feel free to Google if you don't believe me).

Scenario:
Problematic Java application running on a Linux server with a large heap (~16 GB).
My devices, Windows Laptop/Desktop with a limited number of RAM.

Goal:
Take a heap dump and analyze with Eclipse Memory Analyzer.

Heap Dump

@EugeneChung
EugeneChung / .gitignore
Created July 18, 2022 06:46 — forked from ELLIOTTCABLE/.gitignore
BASH Script to keep Route53 updated with your current external IP address
*.ip
*.log
@EugeneChung
EugeneChung / Route 53 Updater
Created May 25, 2022 06:37 — forked from hsiboy/Route 53 Updater
BASH Script to keep Route53 updated with your current external IP address
Roll your own dynamic DNS service using Route53
@EugeneChung
EugeneChung / publish-kafka-metrics.sh
Created May 4, 2022 08:43 — forked from idooo/publish-kafka-metrics.sh
Script to publish JMX metrics from Kafka broker to AWS Cloudwatch
#!/usr/bin/env bash
# Kafka utilises JMX to provide an access to some useful data
# This script uses command line JMX client to retrieve those metrics from a Kafka broker
# and publish them to AWS Cloudwatch
# JMX Client: http://crawler.archive.org/cmdline-jmxclient/downloads.html
# Runtime dependencies: Java, AWS CLI, IAM role attached to the instance with permissions
# to put Cloudwatch metrics
@EugeneChung
EugeneChung / KVCache.h
Created August 25, 2018 20:15 — forked from reyoung/KVCache.h
A C++ 11 key-value object instance cache.
#include <memory>
#include <unordered_map>
#include <functional>
#include <mutex>
#include <glog/logging.h>
/**
* Key-Value Cache Helper.
*
* It store a object instance global. User can invoke get method by key and a
@EugeneChung
EugeneChung / toc.js
Last active April 3, 2018 07:02 — forked from piroor/toc.js
Generate Table of Contents for GitHub Wiki Pages
// How to use:
// 1. Go to a page of GitHub Wiki with Mac Chrome.
// 2. Copy this script to the clipboard.
// 3. Hit Cmd-Opt-J to open Web Console.
// 4. Hit Cmd-V to paste this script.
// 5. Hit Enter to run script.
// 6. If you are not in edit mode, click the "Copy ToC" button shown in the page.
// Then ToC is copied to the clipboard, so paste the TOC from the clipboard.
var container = document.querySelector('.markdown-body');
@EugeneChung
EugeneChung / README.md
Created March 16, 2018 20:12 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@EugeneChung
EugeneChung / WordCounter.scala
Created October 24, 2017 01:37 — forked from Diego81/WordCounter.scala
Simple Word Counter implemented using Akka
import akka.actor.{ Actor, ActorRef, Props, ActorSystem }
case class ProcessStringMsg(string: String)
case class StringProcessedMsg(words: Integer)
class StringCounterActor extends Actor {
def receive = {
case ProcessStringMsg(string) => {
val wordsInLine = string.split(" ").length
sender ! StringProcessedMsg(wordsInLine)
@EugeneChung
EugeneChung / advance_commands.vim
Created April 22, 2017 13:38 — forked from fakemelvynkim/advance_commands.vim
advanced vim commands to review
da< (or) da( (or) da{ // delete the block including <,(,{ and >,),} rsply
di< (or) di( (or) di{ // simillarly, but excluing <,(,{ and >,),} rsply
yi< (or) yi( (or) yi{ // yanks simillarly. Simillarly for ciw, viw, etc
df<Space> // delete from current char including the next space
daw // delete current word including the next space
diq // delete current word excluding the next space
yiw // yank current word excluding the next space
yaw // yank current word including the next space