Git – checkout remote branch
To checkout remote branch and track it from its remote origin $ git fetch $ git branch -v -a ##List available remote branches $ git read more
Ubuntu – reload iptables rules during boot
Steps to load iptable rules automatically on Ubuntu Linux using package iptables-persistent. Install iptables-persistent $ sudo apt-get install iptables-persistent When asked during installation should it read more
Java – print exception as string examples
Print exception stack trace Print exception short description
Java – string prefix match using startsWith
Java String startsWith(String prefix) example: To specify offset use startsWith(String prefix, int toffset)
Java – two dimensional array example
Java – two dimentional array example
Java – fill an array using java.util.Arrays
Fill all values in an array Fill range in an array
Mac – print java home on command line
To print Java (JVM) home path on command line the following command (jave_home) can be used as shown below: $ /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home To display all read more