Internet TV and video conversion
A little while ago I bought an HDTV and was looking for a nice media player and a conversion tool to help me enjoy it. As I already had paid for the TV, I assumed that free software would be nice. Here’s what I found that works for me.
The role of the media player or media center was quickly filled by a program called Boxee which is generally described as a cross-platform freeware media center and includes features like social networking, lets you view, recommend and rate the videos you watch.
Everyday tools
In this post I want to share with you a few tools which in my opinion are really useful. A while ago I found this page called FileHippo that contains a lot of free software and they even maintain older versions which is great for when you’re searching for a particular version of some tool and can’t find anywhere else. But the really nice thing is that now they have this program called Update Cheker which you can download and install on you machine and it will analyze the software that you have installed and present you with a list of possible updates including the beta versions as a separate section.
Firefox extension compatibility
From time to time I like checking out the bleeding edge version of some software. Firefox is always a good candidate for that, because of the many improvements in performance and features. I downloaded the Firefox 3.7a nightly build from http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/. It’s seems pretty stable on my computer and is obviously faster. Sunspider tests confirm my expectations of increased javascript performance which is roughly 40% faster than Firefox 3.5.5 on my machine.
SSH with Java
Recently I needed to do some server manipulation over the SSH-2 protocol from a Java client program. There are quite a few choices of SSH libraries for Java out there. Usually I prefer BSD license whenever possible, so I thought I’ll give Ganymed SSH-2 for Java a try. It turned out to be pretty simple to use. Here’s a short example of how to connect to the server using the private key and execute some command.
Firefox add-ons
Here I’ll just put my most used Firefox add-on list. Actually two lists – one for web development related add-ons and the other for general surfing and enjoying the web.
Developer’s add-ons
Web Developer Firebug Firecookie YSlow iMacros PageDiff Tamper Data Greasemonkey DOM Inspector InspectThis Surfing add-ons
StumbleUpon Delicious Bookmarks Adblock Plus Fire.fm Video DownloadHelper Cooliris Clipmarks Rikaichan Screengrab TwitterFox There’s also this more official list of add-ons for Firefox categorized by the things you do on the web.
Profiling Firefox
OK, this is a simple one, but I sometimes forget, because usually you do it once on any computer and then don’t think about it. Firefox is a great browser and what’s even more great is that it allows you to create different profiles so you can have different configurations/add-ons/layouts for general browsing, web development, extension development, etc. The first step is to create a new profile which can be done by typing
Certificate Generation with Java Tools
Java has a useful tool for generating private-public key pair, it’s called keytool and is located in your jdk/bin directory. Here’s a command line that I often use to generate keys and self-signed certificates for testing.
$ keytool -genkey -keyalg RSA -validity 365 -alias MyKey -keystore new_keystore.jks -dname "CN=SubjectName, OU=My Department, O=My Company, L=Vilnius, S=Vilnius, C=LT" Also it is sometimes needed to generate a request to get a signed certificate. Having created a keystore as shown above, it is easily done with the following line.
iBatis and Stored Oracle procedures/functions
This one took me a while to get it right the first time. I won’t go into details of configuring iBatis datasources and such, and will go straight to putting some queries in the sqlMap file. Just let me note that I’m using iBatis 2.3 for these examples. I’ll start off with a procedure call.
<procedure id="getUserRoles" parameterMap="myParamMap"> { call SCHEMA.GET_USERS_ROLES(?, ?) } </procedure> This one is pretty self-explanatory, just defining a procedure to be called.
Firefox 3 Download Day
Just found out about Firefox 3 Download Day and wanted to do my part by spreading the word. They’re trying to set a Guinness World Record for most software downloads in 24 hours. Sounds pretty simple, just download a great browser and help achieve the record.
You can also follow the Firefox news on twitter.
Using maven
Maven is an awesome build tool for JAVA, but it has some long parameter names that I don’t like to remember, so I put my often used tasks of maven in batch files.
install.bat
mvn install:install-file -Dfile=%1 -DgroupId=%2 -DartifactId=%3 -Dversion=%4 -Dpackaging=pom -DgeneratePom=true This installs the specified .jar file in the local repository located in
C:\Documents and Settings\*User*\.m2\repository where *User* is your username. Four arguments are required: jar_file, group, artifact and version.
tail -f for windows
Here’s a simple implementation of “tail -f” UNIX command equivalent in python. I used it a lot on windows servers to monitor log files. The good thing is that it works over SMB (windows shares).
#!/usr/bin/env python import sys, os, time def main(argv): if len(argv) < 2: print "Usage: tail filename.log" exit(1) try: fp = open(argv[1], "r") st_results = os.stat(argv[1]) st_size = st_results[6] fp.seek(st_size) while 1: where = fp.tell() line = fp.
A couple of useful resources
A while ago found this great page that aggregates various posts relevant to developers. Just to remind myself and maybe let others know, if you haven’t seen it definitely check it out – http://www.dzone.com
Recently I had the need to alter an SVG file that was produced by someone else. Now although you can do this by opening it in a text editor and make the changes by hand, but you would need to know the SVG tags, attributes, etc and more complex graphical changes are just too difficult.