Skip to content

Instantly share code, notes, and snippets.

alias gdm="git diff master"
alias gmm="git checkout master; git pull; git checkout -;git merge master;"
alias dka='docker rm -f $(docker ps -a -q); '
alias reload="mvn clean package -DskipTests; ./build.sh; ./start.sh;"
alias idea="open -a IntelliJ\ IDEA"
alias java8='export JAVA_HOME=`/usr/libexec/java_home -v 1.8`'
alias java11='export JAVA_HOME=`/usr/libexec/java_home -v 11`'
@yahyaergun
yahyaergun / wait-for-it.sh
Created July 24, 2019 14:47
sh native way to wait for dependencies on docker-compose that can be used with alpines:
#!/bin/sh
# Use this script to test if a given TCP host/port are available
TIMEOUT=15
QUIET=0
echoerr() {
if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi
}
@yahyaergun
yahyaergun / AVLTree.java
Last active June 10, 2019 16:16
AVLTree
/* Class node is defined as :
class Node
int val; //Value
int ht; //Height
Node left; //Left child
Node right; //Right child
*/
static int height(Node node) {