How to run H2 database script from command line


You can use the RUNSCRIPT SQL statement:


or you can use the RunScript standalone / command line tool:

java -cp h2*.jar -url jdbc:h2:~/test -script test.sql

You can also use the RunScript tool within an application:

RunScript.execute(conn, new FileReader("test.sql"));

How to rotate video with ffmpeg

To rotate 90 degrees clockwise and convert to mp4 (HTML5 compatible), I use:

$ ffmpeg -i 20130914_180610.mp4 -vf transpose=1 -vcodec libx264 -r 30 -strict experimental 20130914_180610-3.mp4