Skip to content

Instantly share code, notes, and snippets.

View munendrasn's full-sized avatar
πŸ’­
I may be slow to respond

S N Munendra munendrasn

πŸ’­
I may be slow to respond
View GitHub Profile
/*
* Copyright (C) 2018 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@munendrasn
munendrasn / jemalloc.md
Created May 9, 2020 10:39 — forked from vstakhov/jemalloc.md
Jemalloc profiler practical sample
  1. Get source package: apt-get source libjemalloc-dev
  2. Install build depends: apt-get build-dep libjemalloc-dev
  3. Go to the source dir and edit debian/rules file adding the following text:
override_dh_auto_configure:
        dh_auto_configure -- --enable-debug --enable-fill --enable-prof --enable-stat
  1. Build packages: dpkg-buildpackage
@munendrasn
munendrasn / HeapDump.java
Created March 21, 2020 19:26 — forked from TuxCoding/HeapDump.java
Dumps the JVM heap stats to a single string or in a file which then can be analyzed by VisualVM or Java Mission Control
import java.io.File;
import java.lang.management.ManagementFactory;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@munendrasn
munendrasn / HeapDump.java
Created March 21, 2020 19:26 — forked from TuxCoding/HeapDump.java
Dumps the JVM heap stats to a single string or in a file which then can be analyzed by VisualVM or Java Mission Control
import java.io.File;
import java.lang.management.ManagementFactory;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@munendrasn
munendrasn / send_metric_to_statsd.sh
Created February 12, 2020 12:28 — forked from nstielau/send_metric_to_statsd.sh
Send a metric to StatsD from bash
# Send a metric to statsd from bash
#
# Useful for:
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/)
# init scripts
# sending metrics via crontab one-liners
# sprinkling in existing bash scripts.
#
# netcat options:
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed.
@munendrasn
munendrasn / setup-gh-cli-auth-2fa.md
Created June 24, 2019 07:04 — forked from ateucher/setup-gh-cli-auth-2fa.md
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email '[email protected]'
    
@munendrasn
munendrasn / gist:f13db1e2e7fd247fc14316d7a1c565a3
Created February 10, 2019 04:51 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@munendrasn
munendrasn / git_submodules.md
Created October 7, 2018 05:30 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@munendrasn
munendrasn / installantoncentos.sh
Created May 5, 2018 06:20 — forked from parzonka/installantoncentos.sh
How to install ant on centos
# download and install
antversion=1.7.1
wget http://archive.apache.org/dist/ant/binaries/apache-ant-${antversion}-bin.tar.gz
sudo tar xvfvz apache-ant-${antversion}-bin.tar.gz -C /opt
sudo ln -sfn /opt/apache-ant-${antversion} /opt/ant
sudo sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment'
sudo ln -sfn /opt/ant/bin/ant /usr/bin/ant
# check installation
ant -version
@munendrasn
munendrasn / gist:b78866e7e3414b09aa4875ab29df102b
Created May 2, 2017 15:12 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version