GMail keyboard shortcuts – bb & cc

January 24, 2011

I’m using the keyboard shortcuts extensively in GMail (really like the vi style of them). But some things are not possible to do/I have not found them.

Found some ‘hidden’ keyboard shortcuts in this Google support thread.

d = compose new mail with CC box open
b = compose new mail with CC and BCC boxes open

Now I only have to find something similar to attach files.

Deploy Qt applications on OS X

February 23, 2010

Creating a dmg image on OS X is as simple as:

/Developer/Tools/Qt/macdeployqt myproject.app/ -dmg

SSH public keys

May 24, 2009

How to login without password to a remote server:

  1. Open up terminal on your local Leopard machine and type: ssh-keygen -t rsa
  2. Accept the default location
  3. Type in the passphrase twice
  4. Then copy the public key to the remote server using:
    cat ~/.ssh/id_rsa.pub | ssh username@myserver.com "cat - >> ~/.ssh/authorized_keys"

I found this tip here

PS3: Convert mkv files to mp4

September 12, 2008

This is how I successfully converted a mkv file to a PS3 compatible mp4 file (running Ubuntu 8.04).

First you need to compile ffmpeg with neccessary flags, this guide will show you how.

Then use synaptics to install mkvtoolnix and mpeg4ip-server.

Finally a little script to convert the file:

#!/bin/bash
# converts mkv to mp4

# Check that we can read the input file
[ ! -r "$1" ] && echo "Error! Cannot read $1 !" && exit 1

# Get name and dir from the path
bname=`basename $1`
dname=`dirname $1`

# Dump track information
mkvinfo "$1" | grep -i track > output.txt

# Parse formats
f=`sed -n '/Track type/p' output.txt | sed 's/^.*://' | sed 's/^ *//'`
# Parse track numbers
n=`sed -n '/Track number/p' output.txt | sed 's/^.*://' | sed 's/^ *//'`
# Parse speeds (fps)
s=`sed -n '/Default duration/p' output.txt | sed 's/^.*(//' | sed 's/fps.*)//'`

# Remove temporary file
rm output.txt

# Put track numbers in an array
x=0
for i in $n
do
number[$x]=$i
x=$x+1
done

# Put speeds in an array
x=0
for i in $s
do
fps[$x]=$i
x=$x+1
done

# Match track speeds with formats
x=0
for i in $f
do
if [ "video" = $i ]; then
vidtrack=${number[x]}
vidfps=${fps[x]}
fi
if [ "audio" = $i ]; then
audtrack=${number[x]}
fi
x=$x+1
done

echo "Extracting tracks from mkv file"
mkvextract tracks $1 ${vidtrack}:video.h264

ffmpeg -i $1 -sameq -vn -acodec libfaac -ar 48000 -ab 320k audio.aac

echo "Putting it all in a new and shiny mp4 container"
mp4creator -create=video.h264 -rate=$vidfps ${dname}/${bname}.mp4

mp4creator -c audio.aac -interleave -optimize ${dname}/${bname}.mp4

rm audio.aac video.h264


Follow

Get every new post delivered to your Inbox.