Converting keystores between JKS and P12

From TECH BLOG FOR EJBCA ENTERPRISE OPEN SOURCE PKI's articel Converting keystores between JKS and P12.

Johan dug up these keytool commands, that with in JDK6 and onwards (not in JDK5 and earlier).

JKS → P12

keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS  -deststoretype PKCS12 -destkeystore keystore.p12

P12 → JKS


git cheat sheet

Here is my personal git cheat sheet.

Simple commands

Pull commits from remote repository

git pull

Will pull commits from the "origin" remote repository and merge any changes into your local repository.

git pull --rebase

Will pull commits from the "origin" remote repository and replay your local changes on top of these commits. You will not get a extra "merge commit" but it can only be used on a repo without local changes. All changes must be committed or stashed.

Branches and tags

List branches local and remote


Setting up SMTP server on a development test server running Ubuntu

This is a simple step-by-step tutorial to install and configure exim to route all e-mails send though a local SMTP server to one local user, regardless of the e-mail address or domain. I found this set-up very usefull when testing applications that send e-mail messages and you do not want to generate multiple HotMail accounts for testing or in case I'm wanted to do some testing and development when I'm offline.

Install exim

Start with installing exim.
user@devmachine:~$ sudo apt-get install exim4


Provide one datasource with two different JNDI names in JBoss

While testing your JBoss service it can be very handy to use DefaultDS as your data source. However you will probably not want to hardcode this JNDI name into your code, jboss-server.xml, web.xml or persistence.xml (depending on service you write). There you want to use your own "MyAppDS" JNDI name. So wouldn't it be sweet to be able to bind two different JNDI names to the same datasource ?

It is possible and quite simple however I could not really find any good example while Googling the problem. So here is a short description how I solved my problem.


Ubuntu 10.10 on ASRock X58 Extreme3

As a Xmas-gift to myself I decided to replace my 10 year old workstation with a new one. After recommendations from a friend I decided to buy the new computer from Mr. PC Computers. I also enjoy supporting local dealers. The very next day I could collect the computer and once at home I downloaded and installed Ubuntu 10.10 (Maverick Meerkat).

Hardware specs and BIOS settings

Intel Core i7 950 3066MHz Socket 1366 Box

Backup DVD using HandBrakeCLI

Making copies of your DVD movies into MKV format has never been easier thanks to HandBrake.

Below is a small shell script that uses HandBrakeCLI to save the longest title and Swedish subtitle into MKV format.

# This is a simple shell script which will 
# grab the longest title and Swedish subtitle and 
# then encode it as MKV
TITLE=`lsdvd -c | grep "Disc Title" | gawk '{

Android Debuger, Samsung Galaxy GT-I7500 and Jaunty & Maverick

Using information and help from Olaf and patched adb from Flori7500 I can now use Android SDK to connect to my Galaxy.

Here is how I set-up Ubuntu 9.04 (Jaunty Jackalope) so that I could use adb to access my Samsung Galaxy GT-I7500. I can confirm that the same instructions also works after upgrading to Ubuntu 10.04 and Ubuntu 10.10.