Entries filed under Misc Scripting

27c3 Android App

Posted on 13. November 2010 Comments

Update: see below

Github: https://github.com/repat/27c3-Android-App

So this is my version of the 27c3 Android Fahrplan App. At the moment it only links to the fahrplan website, depending on which day/event you click. The advantage is, it’s always uptodate;)

Please note the following:

  • I didn’t use to be a Java programmer and wrote this when I knew next to nothing about Java and Android
  • If I find some time, I’m gonna extend it to a real app
  • But I don’t think so, so feel free to download the sourcecode and extend it yourself 🙂
  • I really don’t know why it’s able to access the SD card and telephone status…don’t worry about it;)(see comment)


Screenshots (click to enlarge)

android app 27c3 logo

android app 27c3 website


  • added TabView for events and speakers

Diaspora on Dockstar with Debian Lenny

Posted on 13. Oktober 2010 Comments

I’ll write this in English because more people might want to read it;)

Diaspora, programmed by 4 young hackers in NYC, is „The privacy aware, personally controlled, do-it-all, open source social network“(joindiaspora.com). Some say it’s gonna be a facebook killer, some say it’s gonna fail for various reasons. Basically, the idea is to create your own server – seed – which „speaks“ to other servers on the diaspora network, so a decentralized network instead a central server(farm) like facebook or several others. The main reason to do this is that your data stays in your own hands. Therefore everybody would have to install their own servers, which 99,9% of all internet users wouldn’t, simply because they wouldn’t know how.

Unfortunately they decided to write the whole thing in ruby(on rails), which I don’t know and most of the paid-hosters don’t support by default(unlike http/php/mysql/perl). As the database system they chose MongoDB, unusual as well.

My idea would have been, to install Diaspora on a mini server like the Sheeva Plug or Dockstar(3-5 Watt), with a debian/gentoo system on a USB Stick. It’s not to hard, there are a lot of tutorials on the internet. All the packages, like ruby/rake are supported. But would have? Yes, because obviously MongoDB doesn’t support ARM(Debian Lenny on a Dockstar with all dependencies installed):

In file included from db/../bson/bsoninlines.h:21,
from db/jsobj.h:43,
from db/jsobj.cpp:21:
db/../bson/util/atomic_int.h:96:4: error: #error "unsupported compiler or platform"
scons: *** [db/jsobj.o] Error 1
scons: building terminated because of errors.

So unless you want to keep your HomePC running 24/7(effect on environment? energy cost?), there’s no chance to host your own Diaspora seed at home. Therefore you have to pay a hoster to do so, and nearly nobodie’s gonna do that, because facebook is for free. I don’t think Diaspora will change their database system, so this goes out to all MongoDB developers: Please add support for ARM! According to this post on in a google group it can’t be too hard, but I really can’t tell:/ As I found out while googling I obviously wasn’t the only person who thought this might be a good idea:)

I’ll try to keep you uptodate, if anybody finds a solution, please post a comment:)

update: I just tried to use the same code for ARM as for i386 and – of course – got an error:

/tmp/ccEB7sgz.s: Assembler messages:
/tmp/ccEB7sgz.s:7236: Error: bad instruction `lock'
/tmp/ccEB7sgz.s:7237: Error: bad instruction `xadd r3,[r2,#0]'

Unfortunately I don’t know any ARM ASM, but maybe someone can translate?

update: In the code(/bson/util/atomic_int.h) it said

// this is in GCC >= 4.1

So I just added || defined(__arm__) because my dockstars gcc said:

# gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
 --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,
objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
 --without-included-gettext --enable-threads=posix --enable-nls
 --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu
 --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions
 --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 

I thought this might work. Then it compiled for about 3 hours and I got this error:

db/jsobj.o: In function `mongo::AtomicUInt::operator++(int)':
/root/mongo/db/../bson/util/atomic_int.h:60: undefined reference to `__sync_fetch_and_add_4'
util/message.o: In function `mongo::AtomicUInt::operator++(int)':
/root/mongo/util/../util/../db/../bson/util/atomic_int.h:60: undefined reference to `__sync_fetch_and_add_4'
db/stats/counters.o: In function `mongo::AtomicUInt::operator++(int)':
/root/mongo/db/stats/../../bson/util/atomic_int.h:60: undefined reference to `__sync_fetch_and_add_4'
/root/mongo/db/stats/../../bson/util/atomic_int.h:29: undefined reference to `__sync_fetch_and_add_4'
/root/mongo/db/stats/../../bson/util/atomic_int.h:29: undefined reference to `__sync_fetch_and_add_4'
db/stats/counters.o:/root/mongo/db/stats/../../bson/util/atomic_int.h:29: more undefined references to `__sync_fetch_and_add_4' follow
s/chunk.o: In function `mongo::AtomicUInt::operator++()':
/root/mongo/s/../client/../util/../util/../db/../bson/util/atomic_int.h:57: undefined reference to `__sync_add_and_fetch_4'
/root/mongo/s/../client/../util/../util/../db/../bson/util/atomic_int.h:57: undefined reference to `__sync_add_and_fetch_4'
/root/mongo/s/../client/../util/../util/../db/../bson/util/atomic_int.h:57: undefined reference to `__sync_add_and_fetch_4'
collect2: ld returned 1 exit status
scons: *** [mongodump] Error 1
scons: building terminated because of errors.

Any ideas? Seems like gcc has to be >= 4.4.0. Might be a good idea to install squeeze instead of lenny but it’s nearly 5am and I can’t be bothered now;)

Update: at the MongoDB Bugtracker the user Eliot Horowitz stated:

„Unfortunately compiling is only a small portion of the issue.
The bigger problem is endianness – which is fixable, just a fair amount of work.“

I guess we’ll just have to wait-.-

Update: Great news! Looks like somebody finally did it:

Although they did not really write a tutorial… I can’t seem to find that many differences in the code but it’s definitly right, that ARM is bi-endian(didn’t know that until my professor told me this semester). Might work with the newser gcc version. Anyway, if I find some free time, I’ll test it.




Wordpess Permalinks Weiterleitung Error mit .htaccess

Posted on 18. Juli 2009 Comments

Als ich letztens meine Permalinks umstellen wollte, bekam ich immer denselben Fehler. Jedes mal, wenn entweder ich manuell die .htaccess geändert habe oder wordpress automatisch die Datei geschrieben hab, bekam ich einen Zugriffsfehler und musste über FTP die htaccess überschreiben.

Hat sich herausgestellt, in die .htaccess musste noch „Options +FollowSymlinks“ hinzugefügt werden. Nun sieht sie also so aus:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Danke Nils, für den Tip.

Lazarus Linux Fehler (Ubuntu)

Posted on 28. Februar 2008 Comments

Wenn man folgenden Fehler bekommt:

Das Freepascal Quellverzeichnis wurde nicht gefunden.
Einige Quelltextfunktionen werden nicht funktionieren.
Es wird empfohlen, dass Sie den FPC-Quelltext installieren und den Pfad auf sie setzen, und zwar unter
Einstellungen -> Umgebungseinstellungen -> Dateien

Einfach mal auf die Sourceforge-page von Lazarus gehen und die Datei fpc-src_2.2.0-071107_i386.deb runterladen. Natürlich für andere Linux Distributionen entsprechend andere Packete bzw. die .tar.gz

Das ganze ist natürlich im Ubuntu-Wiki auch schon beschrieben, aber für Suse sucht man auch nicht unbedingt im Ubuntu-Wiki.