Migrating from Owncloud to Nextcloud on Fedora 24

Installing nextcloud on fedora is not trivial as you first need to download the code, install some dependencies and compile it.

git clone https://github.com/nextcloud/client_theming.git
git submodule update --init --recursive
dnf install cmake gcc-c++ openssl-devel sqlite-devel qt5-qtwebkit-devel libqt5keychain-devel
mkdir build-linux
cd build-linux
cmake -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client
make
sudo make install

Without installing the dependencies you would get the following error messages:

Tags:

Using a .NET FileWatcher with a dfs properly

There is not a lot of information with practical experience about the Microsoft .NET File Watcher Technology available in the internet. So here some advices.

How it works

It is basically a wrapper around the windows api function ReadDirectoryChangesW.

Possible restrictions with remote locations

There might be several limitations in place that you usually cannot see:

Tags:

PHP-Script for sending personalized html newsletters

I searched for a simple solution to send some personalized html e-mails with embedded pictures. However I didn't find one. Thus I created the following script:

Find out what library is missing Fedora 22

Sometimes some libraries are missing. This leads to the following error message:

./command: error while loading shared libraries: abc.so.0: cannot open shared object file: No such file or directory

It will only display the first missing library. So first you can use the following command to identify them:

ldd idaq | grep found

This might lead to the following output, where you can see a list of all missing libraries:

Tags:

Run IDA Disassembler on x64 Fedora 22

When executing idaq I got the following error message:

./idaq: error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

This error appeared because I lacked some libraries (32-Bit version). To fix it I had to run the following commands:

dnf install glib2-devel.i686
dnf install freetype.i686
dnf install libSM.i686
dnf install libXrender.i686
dnf install libXext.i686
dnf install fontconfig.i686

Tags:

DevArt Bulk Data Insertion into an Oracle Database

There are some possibilities to bulk insert data. For my tests I inserted 1'500 rows containing some strings.

  • Use the Context: 50 seconds
  • Use ArrayBinding: 43 seconds
  • Use the OracleLoader class: 14 seconds

It seems that the OracleLoader is the fastes way to do this.

ArrayBinding:

Oracle SQL Fast Retrieval of CLOBS

If a table contains CLOBS, depending on the method you use to connect, usually the CLOB-columns just return a handle that will trigger another connection/query to the database in order to retrieve the value. This makes it really slow. An easy way to speed it up is to retrieve everything which is small enough as string value. A string value however is limited to 4'000 characters. Thus you need to issue two queries:

Tags:

Import local subversion repository to git

If you want to import a local subversion repository (maybe a dump) to git you can do this quite easily:

First you need to map the Subversion commit authors to Git commiters. For you just create a textfile author-mapping.txt:

svnauthorname=gitauthorname 

And then you run the following commands:

Tags:

Mangled Names on Synology Diskstation

From time to time I noticed strange filenames on the Synology Diskstation. Names like BGELMF~0. They always had a tilde. Those strange names are called mangled names. Samba has a feature to provide them to bad clients. Unfortunately this can also lead to "renaming" those files.

It is better to prevent this behavior altogether. To do this you need to connect over SSH to your diskstation and then you need to login as root.

Issue the following commands:

cd /usr/syno/etc
vi smb.conf

Now insert the following line in the section global:

Tags:

Exact Copies for Backups

In order to create a backup you should first of all make an exact copy

rsync -aHAX --delete /srcfolder /dstfolder

And then also check if the copy is indeed complete and exact:

diff -r /srcfolder /dstfolder

Tags:

Pages

Subscribe to uhlme.ch RSS