Backup Media

The Problem: You would like to back up your data.

TB’s Advice: There are few options to consider.

1. USB hard disks

Portable USB hard disks are a quite good option, when you have to back up a lot of data e.g. from your laptop. On the downside, they are prone to hard disk failure, and you have to carry them around.

There are a lot of options among USB hard disks. It’s not easy to assess beforehand, which hard disk is the most reliable one.

For a price guideline, the lowest price per gigabyte in Finland for new portable hard disks is around 0.110 €/GB (as of Feb 2011).

TB’s Recommended manufacturers: Western Digital, Seagate.

2. DVDs and CDs

Burning data on a DVD-R is a good option, when you want to store an immutable snapshot of your data. The downside is, that you cannot store handily more than 4GB of data (dual layer DVDs can hold approximately 8GB, but no more).

For reliability, it is recommended to buy DVDs that withstand the test of time.

TB’s Recommendation: Verbatim SuperAZO+.

3. Online backup with encryption

For little amount of data, online backup is nice, because you don’t have to worry about disk failures. The data is kept in big data centers which are only at the mercy of natural disasters or other force majeures. Encryption ensures your data privacy. (Provided that you use a long and strong, secret password to encrypt your data.)

Useful links:

Posted in Advices | Tagged , , | Leave a comment

Make vim use PEP-8 indentation for Python code

The Problem: Suppose you’re using the vim text editor to edit and develop programs using Python programming language. You would like to have PEP-8 conforming automatic indentation.

TB’s advice: Add the line below to your ~/.vimrc (on Windows, %HOMEDRIVE%\%HOMEPATH%\_vimrc):

filetype plugin on

Then, create a directory ~/.vim/ftplugin and add the lines below to a file ~/.vim/ftplugin/python.vim (on Windows, %HOMEDRIVE%\%HOMEPATH%\vimfiles\ftplugin\python.vim):

setlocal tabstop=4
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal textwidth=80
setlocal smarttab
setlocal expandtab
Posted in Advices | Tagged , , , | Leave a comment

Make vim remember the cursor position

The Problem: Suppose you use the Vi improved text editor a lot. You would like vim to remember the cursor position in the files you last edited.

TB’s advice: Add the configuration lines below to your .vimrc:

set viminfo='20,\"500   " Keep a .viminfo file.

" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
        \ if ! exists("g:leave_my_cursor_position_alone") |
        \     if line("'\"") > 0 && line ("'\"") <= line("$") |
        \         exe "normal g'\"" |
        \     endif |
        \ endif
Posted in Advices | Tagged , , , | Leave a comment

Setting up IDS Falcon Quattro in Linux

The Problem: Suppose you’re trying to use an IDS Falcon Quattro video capture card in Linux. It has four BNC inputs and it is not automatically recognized properly by the bttv driver in the current (2010) Linux kernel.

TB’s Advice: Since the Quattro has a PCI bridge and four BT878 encoder chips, every chip is available as a separate PCI device. This means every device has to be defined manually to be IDS Falcon:

# modprobe bttv card=93,93,93,93

or in /etc/modprobe.d/bttv.conf:

options bttv card=93,93,93,93
Posted in Advices | Tagged , | Leave a comment

LaTeX proof reading

The Problem: Suppose you’re writing a LaTeX document to be published in a scientific journal. Or you’re writing your thesis. You would like to automatically proof read your text content — automatically spell, grammar and style check it.

Quite often, people conceive this by copy-pasting the content to Word or an online spell checker manually, either from the LaTeX source code or the text from the produced PDF. This gets rather tedious to do fairly quickly.

TB’s Advice: While there are no free easy-to-use solutions to do everything, there are some tools available. You can use a LaTeX source editing tool, which supports automatic spell checking, such as Texmaker.

TB’s Project Idea: Integrate support for After the Deadline online proof reading service into various tools.

Posted in Advices, Project ideas | Tagged , | Leave a comment

Remote control Windows with RDP over an SSH tunnel

The Problem: Suppose you have an internal network behind a NAT at home, with an SSH Linux server and a Windows box. You want to use the remote desktop to control the Windows box, from a Mac laptop.

TB’s Advice: This is conceived rather easily. If you’re too lazy to set up a VPN or create a NAT rule into your firewall, an SSH tunnel can be used. The RDP protocol uses TCP port 3389. The hard part is to determine the address of your Windows box inside the network. Once you have done that, create an SSH tunnel (in Mac Terminal or iTerm):

$ ssh -L 3389:192.168.1.75:3389 your-server.dyndns.org

Now, connect your RDP client to localhost. On Mac, you can use CoRD.

Posted in Advices | Tagged , , , , , , | Leave a comment