Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.

icon.linkedin.jpgicon.twitter.jpg

  • Subscribe to this RSS Feed
  • Disabling Autodeploy in Eclipse for Web and JavaEE Projects
    02/11/2011 10:10AM

    In some cases it is helpful to have your Java project automatically built and deployed for you by Eclipse.? For me, when working on a dynamic web or JavaEE project I'd much rather run it on the server through the IDE manually, as I tend to save often and I end up having to wait for a previous deployment to finish on a regular basis.

    To disable the feature:

    • Go to: Window/Show View/Servers
    • Double-click on the server that you associated with Eclipse
    • On the right-hand side, should be a collapsed menu titled "Publishing"
    • Expand the menu and you will see the radio buttons with the various auto-deploy options.

    You will need to shutdown the server before you can save the change.

  • Linux Daemons and Services List
    02/08/2011 9:08AM

    A couple of links with lists of the default set of Linux daemons installed on most systems. Helpful to know which ones that you need to disable when locking down a machine.

    http://www.techrepublic.com/article/linux-101-a-comprehensive-list-of-available-linux-services/6018195

    http://www.hscripts.com/tutorials/linux-services/index.php

  • Deleting a File Using the Inode Number
    01/21/2011 10:18AM

    ?

    Sometimes you will accidentally create a file that has special characters in the file name which then prevents you from running commands on it.? In that case, you can resort to accessing the file via it's inode number.

    To do so:

    $ ls -il | more

    In the directory in which the file that you want to examine resides

    This will output a list of files, the first column being the inode number.

    You can then run the following command to delete it, where 123456789 is the inode number:

    $ find . -inum 123456789 -exec rm -i {} \;

    Of course, you can -exec other commands to modify the file as well.

  • Retuning a MySQL Query in CSV
    01/07/2011 8:25AM

    The following is an example of how to run a query on the command line to output the result of a MySQL query to a CSV file.

    Create a text file with the your query, query.sql:

    SELECT * FROM hosts;

    The run the following command:

    mysql --skip-column-names -uuser -ppassword database < query.sql | sed 's/\t/","/g;s/^/"/;s/$/"/;' > filename.csv

    This will run the MySQL query and output the results to a text file in .csv format.

    The sed commands do the following:

    Replace all 'tabs' with ","

    s/\t/","/g;

    Print a " at the beginning of the line

    s/^/"/;

    Print a " at the end of the line

    s/$/"/;

    If you have a single column of data that is returned and want that in CSV, run an additional sed command on the output:

    sed ':a;N;$!ba;s/\n/,/g' > filename.csv


  • Retrieving a Previously Deleted File in Subversion
    12/27/2010 1:06PM

    Let's say that you have deleted a file (or directory) in your checked out copy of a svn repository and then checked it in (committed your change).

    You discover that you really would like to have that file back in your current version of your repo.? You can either us the svn merge command, or copy the file from a previous version of your repo.

    Here is how you can copy the file from a previous version:

    svn rm blah.txt
    svn commit blah.txt -m "removed blah.txt"

    (now you are at version 15)
    Make a number of other commits/changes, and now you want blah.txt back from version 14.

    svn cp url/to/repo/blah.txt -r14 blah.txt
    svn commit blah.txt -m "retrieved blah.txt from r14"

Advanced Search

Categories

Archives