Skip to content

Instantly share code, notes, and snippets.

View gautamr's full-sized avatar

Gautam Roy gautamr

View GitHub Profile
@gautamr
gautamr / gist:3911169
Created October 18, 2012 11:25
maven unpack specific dependency
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>unpack-finch-dist</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
@gautamr
gautamr / gist:80e09cc267f4f686a2ef
Last active May 11, 2018 16:41
ubuntu java eclipse install
gautamr@gautamr-inspiron-5458:~/Downloads$ sudo mkdir /usr/lib/jvm
gautamr@gautamr-inspiron-5458:~/Downloads$ sudo tar -xvf jdk-8u171-linux-x64.tar.gz -C /usr/lib/jvm/
# Before addin this jdk as an alternative, you can see that the new alternative is not listed:
sudo update-alternatives --query java
sudo update-alternatives --query javac
//update-alternatives - maintain symbolic links determining default commands
sudo update-alternatives --list java
// --install link name path priority
@gautamr
gautamr / gist:4173575
Created November 30, 2012 03:19
ubuntu latex
sudo apt-get install texlive
@gautamr
gautamr / gist:4214786
Created December 5, 2012 11:09
maven common commands
mvn eclipse:eclipse -DdownloadSources=true
mvn clean package -Dmaven.test.skip=true
@gautamr
gautamr / spring-cli.sh
Created February 4, 2016 06:28
spring cli with gradle
spring init --build=gradle --java-version=1.8 --dependencies web,security spring-angular-demo
@gautamr
gautamr / setenv.sh
Created August 22, 2016 13:53 — 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
@gautamr
gautamr / setenv.sh
Created August 22, 2016 13:53 — 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
@gautamr
gautamr / linux_commands.sh
Last active September 28, 2016 18:16
Linux commands (run on Ubuntu 14.04 LTS)
# add user; you need to set all things manually
useradd gautamr
# better to do this; home etc. will be created
adduser gautamr
# set the password for gautamr
passwd gautamr
# add sudo permission to gautamr
sudo usermod -aG sudo gautamr
@gautamr
gautamr / jenkins_tomcat.sh
Created November 17, 2016 05:08
Jenkins Tomcat shutdown/start
#!/bin/sh
CATALINA_BASE_APPS="/home/XXX/apache/tomcat-7.0.70-instance-XXX"
APP_DIST="$WORKSPACE/XXX/XXX"
APP="XXX"
PID_FILE="$CATALINA_BASE_APPS/tomcat7-XXX.pid"
if [ -f "$PID_FILE" ]
then
echo "PID file exists: $PID_FILE"
PID=$(<"$PID_FILE")
@gautamr
gautamr / tips.clj
Created July 3, 2017 12:54
Clojure Tips
;; Maps are function
(def inventors {:Lisp "McCarthy" :Clojure "Hickey"})
(inventors :List)
;; -> McCarthy
;; But if you want to get something agianst nil then use get
(get inventors :Scala "Who?")
;; -> Who?
;; keywords are function; so following two give same output