patrick's blog

Find which jar file contains a class

Very handy to know... how to find out which jar file to include in a project to make your imports work. The answer is simple... search which jar file implements that class. I use the following bash function for this:

for f in `find . -name '*.jar'`; do echo $f && jar tvf $f | grep -i "$1"; done

This will search all jars in all subfolders for the text provided in $1!

Hope it helps!

ArchLinux and ownCloud: CSync failed to create a lock file

This time a short how-to about solving the csync error for the ownCloud client on Archlinux.

Every now and again the ownCloud client does not want to contect anymore due to the following error:
CSync failed to create a lock file

The issue seems to be easily solved by removing the lock-file, as suggested (for example) here and here. However, these folders and files do not exist in ArchLinux.

Using git-svn (in ArchLinux)

Using git-svn is very interesting for those forced to use an SVN repository, but preferring GIT (just like me). In this article I will put some tips and tricks I use myself (as well as my standard workflow). For the starters I will also add some hints and tips on how to ensure that the required packages are installed.

My .gitignore file

For future reference. This is the place I will post / update my .gitignore file. At this moment the file is used in project containing:
- Latex
- C++ with Qt
 
My GIT code is in https://bitbucket.org. Great service!
Then... the code:

# In repository we don't need to have:
# Compiled object files
*.o
*.out

# Generated MOC, resource and UI files
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*

# Qt User Project files
*.pro.user

Install LastPass on ArchLinux

Installing the offline application of LastPass in ArchLinux is not too easy for those who do not want to puzzle a bit.

First you need to download the right version of LastPass. You can download it via [www.lastpass.com -> Download -> Linux -> LastPass Pocket (Ubuntu/Debian) :: DOWNLOAD 64bits] or via this link.

Make sure you have the Ubuntu/Debian version!

After the download, unpack the tar.bz2 package:

KDE4 and the Win (windows) key

This will be my first post about KDE (KDE4). I just switched from Gnome3. Not because I do not like the layout, but because it is way too buggy for me. Yak!
Anyway, I am going to try to get used to KDE. I tried before, but I never managed. I do not like to have all those settings around... and all those ways to change the layout of a window... and that it changes by accident if you click somewhere. Heck... I will try for now.

Mouse pointer too fast or slow

Gnome has a really nice utility to change the speed of a mouse pointer. However, recently I bought a new mouse and I noticed that I could not control it's speed as I wished. The speed was too high, which is not very good against RSI. Thus, I set off to find an alternative way to deal with this.

The basic setting can be found under "System Settings -> Mouse And Touchpad -> Accelleration". If this does not suffice then read on.

High speed video and no audio in Linux

Yep, problems in Linux. This issue did not yet trouble me, but it did trouble my girlfriend... and already the second time.

Here is the problem:

Youtube videos do not work anymore. They are played at a too high speed. Normal audio files (mp3 for example) on the local computer also do not play anymore. They also seem to be played at a too high speed. Actually, in short, it seems that nothing works as expected when it is using audio.

If you recognise this, or a part of this, problem... then it might be worth to check the following:

Pages

© 2008 - 2013 Patrick Hanckmann

View Patrick Hanckmann's profile on LinkedIn