This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Pcoverage-per-test && mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/3365628/junit-tests-pass-in-eclipse-but-fail-in-maven-surefire | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.16</version> | |
<configuration> | |
<reuseForks>false</reuseForks> | |
<forkCount>1</forkCount> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String getStringDuration(Temporal startDate, Temporal endDate){ | |
Duration d = Duration.between(startDate, endDate); | |
StringBuilder str = new StringBuilder(); | |
long total = d.getSeconds(); | |
long days = total / DAYS; | |
if (days > 0) { | |
str.append(days) | |
.append("d "); | |
total -= days * DAYS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -h [host] -u [user] -p"password" [--lock-tables=false] db_name [table_name] > dump.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set ^a as default key-binding | |
set -g prefix C-a | |
unbind-key C-b | |
# use | and - to split the windows | |
bind-key | split-window -h | |
bind-key - split-window -v | |
# make the first window number start at 1 | |
set -g base-index 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vundle setup | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.baeldung.com/rest-api-search-language-spring-data-querydsl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM | |
KEY_COLUMN_USAGE | |
WHERE | |
REFERENCED_TABLE_NAME = 'table_name' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example aliases | |
alias zshconfig="vim ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
alias gpom='git pull origin master' | |
alias mvncli='mvn clean install package' | |
alias jjar='java -jar' | |
alias run='mvn spring-boot:run' | |
alias legacydb='mysql -u root -proot -D legacy' | |
alias stagingdb='mysql -u dev_debug -p"v1owd*C$>+" -D platform_staging -h phoenix-db-qa.clickbus.net -A' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void run() { | |
StringBuilder sb = new StringBuilder(); | |
while (true) { | |
try { | |
byte[] buffer = new byte[1024]; | |
int bytes; | |
int bytesRead = -1; | |
do { |