Tuesday, December 24, 2013

Saturday, December 21, 2013

~/apps/jdk1.7.0_45/bin$ ./java
bash: ./java: No such file or directory
sudo apt-get install libc6-i386

Original: http://stackoverflow.com/questions/9081962/java-is-installed-in-listing-but-execution-produces-java-no-such-file-or-d

Wednesday, December 11, 2013

UTC Conversion Chart


Source: http://www.scc-ares-races.org/generalinfo/utcchart.html

Load page in default browser - java

public class LD {


public static void main(String[] args) throws Exception {

final java.net.URI uri = new java.net.URI("http://www.google.com");
java.awt.Desktop.getDesktop().browse(uri);

}
}

Tuesday, December 10, 2013

sshfs

sshfs -p #### $username@$hostname:$hostdir $local_mnt

diskutil unmount $local_mnt
Unmount failed for $local_mnt

diskutil unmount force $local_mnt
Unmount successful for $local_mnt

$ ssh $username@$username 'bash -s' < run_me_on_host.sh

Sunday, November 17, 2013

ServiceMix / Karaf web-console default username and password

Install the karaf-web-console
karaf@root> features:install webconsole

From web-console documentation
... "Accessing the web console"
To access the console for an instance of Karaf running locally, enter the following address in your web browser: http://localhost:8181/system/console
Log in with the username karaf and the password karaf. If you have changed the default user or password, use the one you have configured.

The username and password are smx / smx
see file: $SERVICE_MIX_INSTALL_DIR/etc/users.properties

Friday, November 15, 2013

sudo net usershare add shared /home/you/shared_folder comment username:F guest_ok=n

Thursday, October 31, 2013

Original @ http://acupof.blogspot.com/2010/06/process-heap-eden-tenured-and-permgen.html
public class J {

public static void main(String[] args) {

}

}


...
$ javac J
error: Class names, 'J', are only accepted if annotation processing is explicitly requested
1 error

Wednesday, October 9, 2013

sudo lsof -i TCP:8181 | grep LISTEN
java 1400 m...y 216u IPv6 0x...e5 0t0 TCP *:8181 (LISTEN)

Tuesday, October 8, 2013

grep -roh aaa . | wc -w
Grep recursively all files and directories in the current dir searching for aaa, and output only the matches, not the entire line. Then, just use wc to count how many words are there.
took from s.o. http://stackoverflow.com/a/6135712

Tuesday, July 16, 2013

/bin/mv: Argument list too long

find /path/to/file -type f | xargs -i mv "{}" /path/to/move find . -type f | xargs -i mv "{}" ./archive/