Index ¦ Archives ¦ RSS > Category: hacking ¦ RSS

darcs-fast-import bug with the trytond repo

Estimated read time: 1 minutes

I got this bugreport today, luckily the fix was simple enough that I could provide it within 24 hours, yay. :)


b2evo 3

Estimated read time: 1 minutes

I had an "upgrade to latest b2evo 2.x stable" on my TODO for a long time and then I realized that I would have to upgrade to 3.x. That’s a nightmare, when I switched from 1.x to 2.x it took a few days till I ported my patchset to the new major version. Now that these days I don’t care about details so much, I just decided to drop my hacks and return to the vanilla b2evo. This way the upgrade took only about 5 mins and as a side effect my hacking posts are included on the main page as well.


algr on ppc in gtk apps

Estimated read time: 1 minutes

I just had to notice that recently the altgr key (right apple button) on my iBook does not work in GTK apps. But it does in QT ones. Of course. ;-)

Though this time it was not a GTK bug but an xorg one.

Now that these days we have git bisect, it was trivial to find the bad commit, though to make bug-hunting still fun, there were numerous xorg modules to poke before I finally figured out this will be an xkeyboard-config bug.


git-clone doc bug

Estimated read time: 1 minutes

So there is a one-liner fix I sent yesterday in the git-clone manpage. It was funny, because I tried to parse that sentence about 3 times, then realised that a coma is missing, then it made sense to me. ;-)

mgmaps

Estimated read time: 2 minutes

So a friend of mine showed that he has an offline map on his non-smart phone. A googled for mgmaps and figured out how to use it as well, but it wasn't really trivial, so I'm collecting some links here.

First, you need the mgmaps midlet itself. I read that the KML support (ie importing favorites) has been improved in the development version, so I tried that one.

Given that you must have a signed jar (or otherwise you'll get a question each time you scroll the map), I just went to this page and downloaded the signed devel midlet from there.

The second one was to download the maps I'm interested in, without using the expensive GPRS connection.

First I generated the .map file, using this page. It's really just about generating a descriptor file which contains the coordinates, wished zoom level and map type.

The second step is to actually download the maps based on the descriptor file. I haven't played too much with this, the .net gmapmaker app did the job fine. Yes, a cmdline, opensource app would be better, but I don't really care.

Now if I have a GPS coordinate, I can search for it off-line on my map, as long as it's in Hungary. :) (And the whole map is about 300MB, as I have the map for Budapest with an extra zoom level.)

The third part is about transfering the google maps directions feature to the phone: ie getting the directions on google maps, saving it to a kml file, and using it off-line (for free) on the phone.

This is partly implemented. See this thread on how to save the KML file. There is no nice blue line ATM for the directions (but they are working on it), but apart from that, you have everything.

And yes, this is completely free (if you count the .net app, then only as in beer). :)


Making things harder over time

Estimated read time: 1 minutes

So it's interesting that firefox 3.5 now requires one more click if you want to accept a self-signed cert. I think it's now at 4. And this means that a non-addict user basically won't be able to access those sites, it's already way more complex than what is acceptable for an avarage user.

An other interesting aspects is version control. With SVN, you did only 'svn diff, svn up' and if both were a no-op, then you knew that you can start to work. With darcs, one more command was necessary due to local commits: 'dr what, dr pull, dr push'. And now with git (if you use local branches): 'git diff, git branch, git push, git pull'. (I admit that this second example can be simplified with a shell script, but still. ;) )


GetDataBack

Estimated read time: 1 minutes

I recently made a mistake and instead of just erasing the bootloader from the MBR of a notebook, I erased the full MBR. Of course I made a backup before writing to MBR - but I made it to the second partiton of the disk...

So I tried the parted and the gpart heuristics, but actually none of them gave usable results. Then I just dd'ed with netcat the whole hdd to my machine, used GetDataBack with wine, that found the relevant file, copied the mbr to a pendrive, plugged in to the notebook and dd'ed it back to the hdd.

After a reboot, everything was back. Sadly I didn't really had time in the last one and a half day to do this, except last night. So I had frustrating 36 hours, as I wasn't entirely sure if this was possible to do or not.

Life is good. :)


bash bug

Estimated read time: 1 minutes

Looks like I manged to hit a bug in bash itself. It was triggered by repoman, let's see how upstream will handle it.

picasuck

Estimated read time: 1 minutes

I just wrote a short script (named after cvsuck that can download a whole CVS repo with anon access only) that can download a whole picasa album without installing any firefox extension, binary software from Google, etc.

It's available here.


Merging in subversion

Estimated read time: 1 minutes

I'm just talking about 1.5+, since before that version it's like there would be not git merge, just git cherry-pick. (You had to explicitly specify each revision. That's not merging.)

A quick howto is here.

A command which may be useful but left out is like 'git log master..branch', to see what revisions will be merged:

$ time svn mergeinfo https://swig.svn.sourceforge.net/svnroot/swig/trunk/ \
--show-revs eligible
(...)
real    0m14.902s
user    0m0.155s
sys     0m0.013s

Well, it's getting better, but as the blog post says it's still not git-like.

Actually it's horribly slow, I'm still waiting for 'svn merge https://swig.svn.sourceforge.net/svnroot/swig/trunk/' to finish. ;-)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.