Recent Notes
Displaying keyword search results 91 - 100
Created by nogeek on March 21, 2010 20:13:48
Last update: March 21, 2010 20:23:41
Download JBoss from http://www.jboss.org/jbossas/downloads/
Set environment variables JAVA_HOME and JBOSS_HOME
Open a command prompt and enter %JBOSS_HOME%\bin\run.bat ( $JBOSS_HOME/bin/run.sh on *nix).
Drop your WAR or EAR file into %JBOSS_HOME%\server\default\deploy
Created by Dr. Xi on February 11, 2010 05:07:48
Last update: February 11, 2010 05:08:20
On Linux, you can use the fuser command to find out who has a file open, or is using a port. For example, if you start Tomcat and get the error "Address already in use: 8080", you want to know which process is already binding to port 8080.
# list processes on port 8080
fuser 8080/tcp
...
Created by voodoo on February 08, 2010 04:57:49
Last update: February 08, 2010 04:57:49
If you don't want to open an extra port for VNC or want extra security with SSH, you can setup an SSH tunnel for VNC. On Windows, you can do this with Putty or openssh .
Open a command window, and enter (using Putty as example):
C:\local\bin\plink.exe -ssh -2 -L localhost:5901:r...
When connecting with vncviewer , use localhost:5901 as server instead of remote_host:5901 .
If you use the setup frequently, it is more convenient to setup the tunnel as a Windows service . Assuming the name of the service is vnc_tunnel , the registry entry would look like:
Windows Registry Editor Version 5.00
[HKEY_...
Created by Dr. Xi on August 16, 2007 22:02:46
Last update: February 07, 2010 22:30:19
Today I tried to setup a ssh tunnel on Windows as a service. The command ran successfully in the command window, but failed every time I tried to start it as a service. Then I configured the service to run under my domain account and everything worked fine.
Apparently there's something special about running it under the local system account. I looked up the Runas command but it supported only running as another user, not as local system. I searched and found this article which solved my problem. The following captures the technique used.
Note that the spaces after binpath= and type= are required. The start service command at the end starts a cmd window using local system privileges.
E:\Documents and Settings\Adi>sc delete testsvc
...
Created by voodoo on February 07, 2010 04:59:36
Last update: February 07, 2010 05:01:41
From X(7) manual page : Although the layout of windows on a display is controlled by the window manager that the user is running (described below), most X programs accept a command line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and location for this application's main window. The WIDTH and HEIGHT parts of the geometry specification are usually measured in either pixels or characters , depending on the application. The XOFF and YOFF parts are measured in pixels and are used to specify the distance of the window from the left or right and top and bottom edges of the screen, respectively. Both types of offsets are measured from the indicated edge of...
Created by voodoo on January 26, 2010 04:56:46
Last update: January 26, 2010 04:57:09
The ping command should give a rough estimate of round trip time (RTT):
Pinging google.navigation.opendns.com [208.69.36.2...
In case ping is blocked, you can use synack .
Created by Dr. Xi on September 02, 2008 18:55:18
Last update: January 18, 2010 22:36:24
Remember the times when you googled for solutions to your technical problems? How much time did you spend on wading through the zillions of links to find the ones that are of interest to you? Wouldn't you hope that you can find the answer right away the second time around? How many times were you forced to peruse hundreds of pages of documentation for a very specific need? Did you ever need to experiment with various alternatives because the documentation was vague? Wouldn't you prefer that a shortcut is available when the same thing is needed again? Xinotes is here to record your technical findings so that you won't have to go through the same process again when the problem reappears. Experience has taught us...
Created by woolf on December 28, 2009 00:11:20
Last update: January 15, 2010 04:01:46
From http://www.videohelp.com/tools/MJPEG_Tools :
A sample command line to deinterlace dv footage, give a slight film look, pass it through a Spatial-Pre-Filter, Temporal-Noise-Filter, and a Spatial-Post-Filter, then encode to DVD complient mpeg2 video looks like this -
lav2yuv capture.dv | yuvdeinterlace -f | yuvdenois...
From http://www.linux.com/archive/feature/40069 , the actual video file can be used in place of edit list (eli) file:
# de-noice the video and scale for DVD output
l...
Created by Dr. Xi on December 05, 2009 20:12:16
Last update: December 05, 2009 20:46:45
It's quite easy for Perl to open a pipe and read from it:
$file = "nospace.txt";
open(IN, "cat $file |") ...
But the code breaks when the file name contains a space:
# This does not work!
$file = "yes space.txt";
...
On Windows, these don't work either:
# This does not work!
$file = "yes space.txt";
...
You need to use a technique called Safe Pipe Opens :
$file = "yes space.txt";
$prog = "cat";
...
Created by Dr. Xi on December 04, 2009 05:29:11
Last update: December 04, 2009 05:29:11
From Perldoc :
The exec function executes a system command and never returns - use system instead of exec if you want it to return. It fails and returns false only if the command does not exist and it is executed directly instead of via your system's command shell.
Since it's a common mistake to use exec instead of system , Perl warns you (if -w is set - but you always do that) if there is a following statement which isn't die , warn , or exit .