Solaris : Send mail with attachment

Use following command to send email with attachment in Solaris from command line

uuencode | mailx -s "Mail subject"

uuencode - Encodes file into Base64 so that it can be send as attachment with a mail.

mailx - Email client available in Solaris. Use -s option to specify mail subject.

This is useful for sending log files from server as attachment. This works for me in Solaris 10. It should be same for other versions also.

Selenium WebDriver : Generating IEDriverServer logs

Selenium 2 (WebDriver) uses Windows executable file IEDriverServer.exe to communicate with InternetExplorer. In the event of any issues with IEDriverServer.exe, logs should be generated for the executable. In Java one can use following code to generate log file from IEDriverServer.exe.

    InternetExplorerDriverService.Builder service =
new InternetExplorerDriverService.Builder();
        service = service.withLogLevel(InternetExplorerDriverLogLevel.TRACE);
        service = service.withLogFile(new File("c:\\logs\\selenium.log"));
        WebDriver driver = new InternetExplorerDriver(;

This generates logs with log level of TRACE and is saved to file at path C:\logs\selenium.log

java.util.logging - Bad level value for property: org.openqa.level

Bad level value for property:

    The above error is produced by java.util.logging.LogManager when the log level is invalid. for eg. you might have specified a log level of DEBUG and DEBUG is not a valid log level in java.util.logging.


    Valid log levels in java.util.logging are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL, OFF

    Correct usage is

Fast Git clone using shallow cloning

If you want to get a read only copy of a Git repository quickly you can do a shallow clone. To make a shallow clone use argument --depth 1 along with git command line version.

git clone  --depth 1

When doing a shallow clone with depth of 1, it tells Git to fetch only latest revision of a repository. Normal clone fetches entire history of a Git repository. As per Git documentation, you cannot clone or fetch from it, nor push from nor into it.

Shallow clone is useful when you have a slow network connection or you want to save on the network usage.

Viewing Google Code Git repository versions in plain text

Google provides plain text version of Git repository at different URL. This URL is in the format of This gives latest version of Git repository. To view history of a particular version use URL pattern Using this we can see a particular tagged version or a particular commit version files.

For eg. Selenium version 2.28 can be viewed using

Version number can be obtained using Browse option in the source menu of main project which can be accessed using URL pattern

Downloading source code from SVN/Git repository over HTTP

Sites hosting open source projects provides an online viewer for browsing source code without actually checking out source code using SVN/Git clients. Checking out entire repository will take long time. Also with Git there is no straight forward way to checkout only a particular directory. Cloning Git repos takes long time as Git downloads entire repository to local machine. Even with sparse checkout, Git downloads entire repository. When bandwidth is a concern, one cannot checkout entire repository.

    One can use GNU Wget to recursively download files from online code repositories. For windows this can be downloaded from

    Command to download a directory and its child directories and all files in it recursively excluding index.html is below. This will not download parent directories and files from external sites.

wget --cut-dirs=2 --level=15 --include-directories=src/main/java --recursive --no-parent --no-host-directories…