Rsync as a demon

sudo rsync --daemon

Create a Debian Package

  1. Ordnerstruktur erstellen wie zukünftig unter /
  2. DEBIAN/control Datei erstellen
    Package: helloworld
    Version: 0.0.1-0
    Section: misc
    Priority: extra
    Architecture: all
    Depends:
    Installed-Size: 8
    Maintainer: Thomas Geymayer <tomgey@gmail.com>
    Homepage: www.tomprogs.at
    Description: Ein einfaches "hello world" Skript
  1. Paket packen
    dpkg -b ./helloworld helloworld_0.0.1-0_all.deb
  2. Paket installieren
    dpkg -i ./helloworld_0.0.1-0_all.deb

Make a complete DBpedia dump URL-unescaped

cat dbpedia_2013_07_18.nt | sed 's/%([0-9A-F][0-9A-F])/\\\x\1/g;s/"/\"/g;s/'"'"'/\'"'"'/g' | xargs echo -e | gawk '{print(gensub(/ . </," .\n<","g",$0))}' > ./dbpedia_2013_07_18-CLEAN.nt

Read properties file in Java

	Configuration wsconfig;
	try {
		wsconfig = new PropertiesConfiguration("webservice.properties");
	} catch (ConfigurationException e) {
		e.printStackTrace();
	}

	uuid = wsconfig.getString("tibkdb.uuid");

Installing Linux on USB – Which Linux filesystem for USB devices?

USB Hard Drives = Ext3 or Ext2;
USB Flash Drives = Ext2 with “noatime” or “relatime” mount option

Delete duplicate rows in database table (postgresql).

DELETE FROM in_mam WHERE ctid NOT IN (SELECT MAX(ctid) FROM in_mam GROUP BY video_id, mam_id);

Give group access to a directory where everybody may read/write/update using the SGID bit.

SGID is usually used on directories shared by GroupID. Where users join a group and share access to a directory using the GID of the directory. SGID is then used to ensure that all files created in that directory also belong to the same GID, allowing all group members access.

chmod g+s directory_name