Backup all MySQL Databases of a User

The following script can be used to backup all MySQL-Databases of a user each in it's own compressed. sql file inside a folder with todays date:

Tags:

Using SSH to copy files between systems

Copy something from this system to some other system:

scp /path/to/local/file username@hostname:/path/to/remote/file

Copy something from some system to some other system:

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

Copy something from another system to this system:

Tags:

Backup a DVD

The following command can be used to backup/rip a DVD. All files are decrypted and stored in a folder (with the name of the DVD).

dvdbackup -i /dev/dvd -o ./ -M

If you want to create an iso file from those decrypted files you can use the following command:

mkisofs -dvd-video -udf -o ./dvd.iso ./movie_name

Tags:

Find out how wpf is being rendered

WPF applications can render in three modes: everything in software, partial hardware rendering or full hardware rendering. The rendering mode may have a big effect to the application performance. This it is important to know which mode is active:

Tags:

Converting txt to doc

In order to convert textfiles to word documents you can use the following command

abiword --to=doc -o inputfile.doc inputfile.txt

or if you want to convert multiple files:

find *.txt -exec abiword --to=doc -o {}.doc {} \;

Tags:

Extending the LiquidCrystal library

When using the LiquidCrystal library to output some text on an LCD on my Arduino Uno, I stumbled upon the following problem: if a text is displayed on the screen (let's say "hello world!") and you try to display another text (let's say "bye") you end up with the following text: "byelo world!".

The reason for this is that the screen doesn't clear a line before writing to it.

Tags:

Wikipedia Gotcha if using a proxy server

I was coding a small proxy server. It worked quite nicely with most webpages. But it had problems with Wikipedia.

Firefox issued a request like this:

GET http://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png HTTP/1.1
Host: upload.wikimedia.org

but Wikipedia responded with (trimmed down version):

C# Pass Arguments to the first instance of a program

Sometimes you don't want the user to run more than one instance of a program. But if the user associates a filetype with your programm it shall open the filetype in this first instance. The code below uses interprocess communication to find out if there is already another instance. It further allows the first instance to register an eventhandler which can be called from a second instance in order pass its command line parameters to the first instance.

This is how to use the code:

Tags:

ArchLinux doesn't boot anymore after updating to Gnome 3.8 - Intel Graphics

Yesterday I updated my system to Gnome 3.8. Unfortunately I was not able to boot it anymore. I would only see the boot manager but then It would just hang with a black screen. Switching to a console (Ctrl + Alt + F2) didn't work.

First of all you need to be able to work with your system. The easiest way to achieve that is starting it with runlevel 1.

Tags:

Useful Linux Commands

Using mv to prefix files

The following command prefixes all files with the prefix 2013-10-22_. This is useful for small rename operations

for f in * ; do mv "$f" "2013-10-22_$f" ; done

# Files per Extension

Recursively lists all file extensions in the current folder and below, including a count how many files there are per extension.

Tags:

Pages

Subscribe to uhlme.ch RSS