Brad Lucas

Programming, Clojure and other interests

Bash Function To Download A Web Site

October 23, 2008

Remembering all the options for wget is the reason for the following function. Add it your .bashrc and then run ‘wget-site URL’ and you’ll get a copy of the site locally for offline browsing

function wget-site {
wget -v -m -w 2 -p -E -k $1
}

Continue reading →

This Driver Is Not Configured For Integrated Authentication

October 22, 2008

Scenario:

You are trying to access a SQL Server database. It has been setup for integrated authentication. You know this because when you login via a tool like DBArtisan you don’t need to enter a user name or password. Authentication is through Windows itself.

Step 1:

You figure out that you need a specific JDBC url.

For example,


Continue reading →

Zipexception Error In Opening Zip File

October 21, 2008

Scenerio:

Using ant to call a taskdef that I created. It should log but needed to get the task to see my log4j.properties files.

In the path definition i put a pathelement who’s location pointed directly at the log4j.properties file. This causes the problem as it seems that Ant tries to open any file on the classpath that isn’t a jar.

Solution


Continue reading →

Problem With Ant And The Scp Task

October 20, 2008

Recently resurrected a project and updated the latest dependencies. When trying to release via the SCP task in Ant it just hung.

I found that the best combination of Ant and Jsch is for now (Oct 08) to be

Ant 1.7.0 and Jsch 0.1.29.

Remember to put Jsch’s jar file in ant’s lib directory.


Continue reading →

Bash One-Liner To Unpack Directory Of Tar Gz Files

October 20, 2008

In the directory where you have a collection of tar.gz files.

for FILE in $(ls); do tar -zxvf $FILE; done

Continue reading →