Recent Notes

Displaying keyword search results 1 - 4
Created by Fang on February 08, 2012 21:15:00    Last update: February 08, 2012 21:15:00
This was the error message: [ERROR] The certificate was actually signed by Verisign, but somehow failed to pass Java cert validation. To resolve the problem: Download the cert from the server (with RetrieveSSLCert , for example) Import the certificate into the keystore: $ keytool -import -trustcacerts -alias myserver -f... Define MAVEN_OPTS : $ export MAVEN_OPTS=' The quotes must exist for the value of MAVEN_OPTS , and the path must be absolute ( ~/etc/mavenKeyStore.jks does not work).
Created by magnum on May 06, 2011 12:26:14    Last update: May 06, 2011 12:26:14
The bash environment variable PROMPT_COMMAND contains a regular bash command that is executed just before the command prompt is displayed. For example: $ export PROMPT_COMMAND=a bash: a: command not ... The command a is not valid so you get the error message every time you hit enter. Echo something before $PS1 : $ export PROMPT_COMMAND='echo -n Hi!' Hi!$ ... PROMPT_COMMAND is regularly used to change the xterm window title. You may find this in /etc/bashrc : case $TERM in xterm*) if [ -...
Created by Dr. Xi on March 28, 2011 11:11:33    Last update: March 28, 2011 11:13:21
grep is a versatile command with many variations (grep, egrep, fgrep, then various implementations). It uses a regula expression (regex) pattern to filter input. But then there are basic and extended flavors of regex - leading to even more confusion. And, beware that there are lots of bad examples of regex in the wild... There are two critical questions to ask when you use grep: which grep implementation are you using? what is the flavor of the regex? Here are some examples for gnu grep v2.7: # Find all numbers (no decimal point), basic regex... Use the -o flag to show only the matching part instead of the whole matching line: grep -o -E '\b[0-9]{2}\b' The good thing about the gnu grep is that it...
Created by Dr. Xi on December 12, 2007 20:30:01    Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH. Although it's written in python, it should be easy to port to other languages such as Perl. Apache httpd.conf : LoadModule python_module modules/ ... Python script: import time, os from os.path import basename ...