Programming things
Developing for Android on AMD64
by rullzer on Aug.14, 2010, under Gentoo, Hardware, Programming things
The last couple of days I have done some coding for Android. All my resentment towards java is coming back but getting some cool mobile app requires sacrifices! But I do not want to write about java today.
The problem I encountered when installing the Android SDK is that the some of the programs won’t run on non-multilib AMD64 installations. This is really annoying since I do not want to have 32bit libraries on my system (it is matter of principals!). But linux to the rescue! A simple multilib chroot allows me to compile and deploy my android apps!
Mounting (with bind) the source directory allows me to code in my normal env while compiling in the chroot. Which is not a big thing for me since I code in VIM but for IDE users this might be an advantage!
So for all native AMD64 users there is hope! But it would be better for the Android devs to fix the binaries!
qbook
by rullzer on Apr.25, 2010, under Gentoo, Linux, Programming things
This morning I was up rather early (well not that early but the others were still asleep
). So I decided to do a little coding and came up with a very simple Qt desktop client for facebook. Since it would of course be nice to have client sitting in your task bar showing new notifications, later this can be extended but for now that will do.
All this was created in a about an hour but would not have been possible without qfacebookconnect.
It is far from finished and no notifications are really visible yet but a nice start is made (not bad for 45 minutes coding). See the git repository of qbook if you want to take a peak, all paths are currently hard coded so you will need to do a little hacking, this is mainly because qfacebookconnect is not yet in portage so I can properly link to it.
Maybe next time when I am up early I will first fix an ebuild for that one
Sabnzbd behind apache
by rullzer on Sep.04, 2009, under Annoying things, Gentoo, Programming things
So after upgrading my sabnzbd installation to version 0.4.11, which I by the way the way should create a better ebuild for and do some dependency cleaning but that is a different story.
Like I was saying after upgrading to version 0.4.11 I decided I wanted to close port 8080 (the one sabnzbd is using) to the outside word. Now I know apache has some nice proxy functions so it should be easy.
Make sure apache is compiled with the following modules: apache2_modules_proxy apache2_modules_proxy_http apache2_modules_proxy_balancer
That was the hard part. Now just add a vhost:
ServerName yourserver.com
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8080/sabnzbd/
ProxyPassReverse http://localhost:8080/sabnzbd/a
ErrorLog /var/log/apache2/error.sabnzb.log
LogLevel warn
CustomLog /var/log/apache2/access.sabnzb.log combined
This assumes that you have sabnzbd listening on localhost:8080. Now you probably do not want the whole world watching your downloads (or deleting them or whatever). So we just add some basic apache authentication, use htpasswd2 to create a file with authorized users and add the following lines into the location block.
AuthName "Login Required"
AuthType Basic
AuthUserFile <
require valid-user
That is all.
Happy downloading!
WiiMoteControl
by rullzer on Dec.04, 2008, under Hardware, Linux, Programming things
I have been playing the idea to control my PC with a WiiMote for some time now. But this week I decided to actually write it.
It is a very simple program using bluez for the bluetooth connection with the WiiMote (which we need, obviously) and XTestFakeKeyEvent. This has as a side effect that it will only work with X running. But that should not be a problem since well. Who would want to control his terminal with a WiiMote?
The very very basics is done. The D-Pad on the WiiMote generates up/down/left/right-keyevents. I just need to find a use full meaning for the other buttons. But maybe a control file in which the user can specify all is a better solution.
Currently it is not published on-line (yet) since I need to clean the code a little.
I am aware some other programs can do what I want but after checking out the sources they just seem to complex. I want it all simple, clean and small..
last.fm support comming to QtMPC
by rullzer on Nov.24, 2008, under Music, Programming things
Sander and I are thinking about adding last.fm support to QtMPC. This since the interface for requesting album covers, artist/album info is so much easier then the amazon-api.
For this we found a nice library: libmaia. Beside a small bug I found (which reminds me I have to report it upstream). This works very well. I browsed a little trough the source and it is pure Qt so it won’t limit the platforms QtMPC can run on.
Now of course last.fm support does not limit us to retrieving album covers. We can also submit the played songs to last.fm so the users can keep scrobbling. Now the only thing I could not figure out if submitting played songs can also be done trough XML-RPC? Is there anyone with experience in this are that can tell me if it is possible?
Other than this we are waiting for MPD 0.14, which will include idle (event) support, before go coding like crazy on QtMPC again. This since events will require a change in QtMPC. Good change which will allow QtMPC to have much less wake ups. Which is generally a good thing.
Of course we still do bug fixes.
DIY Openstreetmap Slippy map
by rullzer on Aug.31, 2008, under Gentoo, Programming things
It has been long since my last post. Too long. I won’t fill you up on all the things I have done. Or maybe I will in other posts. But today I want to talk about openstreetmap.
As you might (or might not) know openstreetmap aims to provide a free (as in speech) map of the world. You can help by adding or editing the map. This is what I have been doing the last couple of months. Mostly fixing roads or adding new cycleways. Now of course cycling is good exercise. And it feels good to contribute to a free world map. However the real kick is seeing your changes of your work!
This can be seen on the main website. However that is only updated once a week. There are several other tile servers that serve a part of the map. These servers are generally updated more often. However when you use a tile server you are can’t change the rendering. So how great would it be to create your own rendering?
Check out my wiki entry. Of course it is a wiki so add all improvement you can think of.
Removing abandond distfiles
by rullzer on Jan.23, 2008, under Gentoo, Linux, Programming things
After going trough my /usr/portage/distfiles/ I found a lot of tarballs that belong to versions of packages that are no longer in portage. Now these tarballs take up a lot of space. Doing a nice rm -rf * will ofcource take care of the problem but then all the tarballs that are still in portage will have to be downloaded again if once of the gentoo boxes in the network needs it (currently 4). Now it is not that I have a datalimit but it is a matter of principle.
So there must be an easier solution. I’ll try to look into it but python is writen in portage so maybe I can just include it and check for all packages and versions and remove the tarballs that have no corresponding ebuild. This script doesn’t have to run every day since it would take some time I guess but once a week or so just to keep the system clean.
Please let me know if anybody is interested in such an app or knows if it already exists…
Media PC / QtMPC
by rullzer on Jan.13, 2008, under Linux, Programming things
It has been some time since my last post where I wrote I had the need for a Project in the vacation. And well I found one and altough the vacation is already over for a week I’m still (when I’m nog busy for school) working on it with Sander. For more info about why and the program see his blog.
But in shoort. We are working on a Qt4 frontend for mpd: QtMPC. So far it is already useable. Sander even kicked apache from his media PC since he didn’t use it anymore. We are far from supporting everything MPD supports but we are getting there. Soon (I hope) 0.3 will be released since we are making good progress but ofcourse the svn is available all the time
svn co http://qtmpc.lowblog.nl/svn qtmpc
Working on QtMPC made me realise that I had way to many music files. So maybe it is also time for me to get a media PC. However the budget is limit. But after talking to Sander yesterday I realised that an old pc would also work. However they make way to much noise. So right now I’m looking for some kind of old thin-client or something like that. Since crosscompiling can be done on the server or on my old laptop.
Now I could ofcourse get a cable and connect it to the server and the stereo but I’d rather not have alsa running on my server. Also if it is a pc with lets say 300 mhz. That would be more than enough to play music. It would consume much less power than my old laptop (wich is currently hooked up to the stereo). So that is again a big plus.
Ah well maybe when my next salary arrives.
Project Need
by rullzer on Dec.28, 2007, under Gentoo, Linux, Programming things
So since it is vacation, Christmas is over and I have some time to fill. I have been thinking about some projects to do but could not really think of something doable in a few days. Since well I do not mind long term project I just want something where I have something working in a few days.
I had a nice idea that I borrowed from Tobias Koenig about bus-services. So I checked the transport company in Amsterdam. Wrote them a nice email if they have a way to communicate with the database. XML-RPC or something like that. Since I do understand they would not allow me directly on the database. An email came back that they do not have such a service and indeed could not allow me on directly on the database.
That is all understandable but the departure times are all available on the internet so I decided to give it one last try. A dump of the departure times from the database. But again they could not help me. Now I wonder why is that. I wrote a nice email that I just wanted to make a nice program. Why can’t they share that stuff with me? Or anyone else?
Now I could ofcourse parse the whole stuf by myself. But that would mean I had to write some ugly parser in their web of html. Which I do not like.
So that project won’t work for me. Then a friend of mine suggested a simple bittorrent client. That can run on a server and a nice client program to connect to it. So It can run while you are asleep or whatever. However after looking at a bittorrent file and the protocol I figured that would not be something I could have working in a few days.
So no project now. If you have any suggestions drop a comment please.
SABnzbdplus -> SABnzbd (improved ebuild)
by rullzer on Nov.13, 2007, under Gentoo, Linux, Programming things
I had some contact with the SABnzbdplus maintianers today and it tuns out that the program is still called SABnzbd. So I switched the name of the ebuild and all reverences to SABnzbdplus are removed. This does mean users will have to chown their custom download dirs again. Sorry for that Chris.
Changes to the ebuild:
- All templates in the original package are now installed
- More info at the end of the ebuild
- Passes repoman, well not totally since it uses local use flags.
- Changelog enty
If you have the time please grab the ebuild here and give it a spin.




