Skip to content

Instantly share code, notes, and snippets.

View mahamuniraviraj's full-sized avatar

Raviraj Mahamuni mahamuniraviraj

  • Satara, India
View GitHub Profile
Maven : My Guide
Based on my experiences and learnings
https://en.wikipedia.org/wiki/Apache_Maven
https://maven.apache.org/what-is-maven.html
@mahamuniraviraj
mahamuniraviraj / setenv.sh
Created March 28, 2018 10:34 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@mahamuniraviraj
mahamuniraviraj / FileHeader.txt
Created January 13, 2018 01:55
Eclipse File Header Template
/**
* File : ${file_name}
* Version : 1.0
* Date : ${date}
* Author : ${user}
*
This file is part of ${project_name}.
${project_name} is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@mahamuniraviraj
mahamuniraviraj / java8-CompilerSourceTargetVersion-utf8-Maven-config.txt
Last active March 9, 2018 15:54
Maven Config Compile for Java 8 and also enable UTF8
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>my-webapp-name</display-name>
@mahamuniraviraj
mahamuniraviraj / MongoDb Atlas Cluster Connection.txt
Created October 23, 2017 17:09
MongoDb Atlas Cluster Connection
mongo "mongodb://cluster0-shard-00-00-ygicr.mongodb.net:27017,cluster0-shard-00-01-ygicr.mongodb.net:27017,cluster0-shard-00-02-ygicr.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username mahamuniraviraj --password <PASSWORD>
@mahamuniraviraj
mahamuniraviraj / AutowiringSpringBeanJobFactory.java
Created October 1, 2017 08:47 — forked from jelies/AutowiringSpringBeanJobFactory.java
Quartz (2.1.6) java config with spring (3.2.1). Using a SpringBeanJobFactory to automatically autowire quartz classes.
package com.jelies.spring3tomcat7.config.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
/**
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies.
@mahamuniraviraj
mahamuniraviraj / Update_svn_version_to1_8_on_Centos6.txt
Created August 9, 2017 09:08
Update svn version to 1.8 on Centos And Configure Eclipse
// Commands are starting with #
Step 1: Setup Yum Repository
Firstly we need to configure yum repository in our system. Create a new repo file /etc/yum.repos.d/wandisco-svn.repo and add following content as per your operating system version.
[WandiscoSVN]
# To initialize a Git repository here, type the following command:
git init
# To get the current state of our repository
git status
# To Add files to staging area
git add filename.ext
git add *.java
@mahamuniraviraj
mahamuniraviraj / setenv.sh
Created June 26, 2017 12:19 — forked from patmandenver/setenv.sh
Tomcat8 setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
@mahamuniraviraj
mahamuniraviraj / How-To_Eclipse_MAT.txt
Created May 24, 2017 13:35
Analyse Java Application for memory usages using Eclipse Memory Analyzer
# Login to server on which java application is running
# Get Java PID
ps -ef | grep java
# Take Heapdump using commandline tool jmap which ships with jdk
# jmap -dump:format=b,file=<filepath> <pid>