Firefox trick

Try this in firefox: Go to any page with lots of images. Delete the URL bar Substitute it with: javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300;y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0) Press Enter and enjoy!!! :-)

More on setting a subversion mirror repository

A few days ago I wrote about setting up a subversion repository using svnsync. On that entry I was using svn+ssh authentication, but there are some gotchas to take into account to avoid having a security issue.If you recall correctly, we had a unix user with which people will access the repository. If we haven’t taken any extra protection, that means that anyone that has their ssh key on such a user’s ~/.ssh/authorized_keys file can log into the system.

Speeding up trac's response time

I’ve been trying to speed up an installation of trac over the last few days. The web interface took ages to display each of the directories or files within the subversion repository. But this one wasn’t too big. The only change to the subversion repository is that we started using a vendor branch imported into our main repository using svm So, after a few hours trying different solutions, and reading trac’s source code, I think I got where the bottleneck was.Well, it was http://www.sqlite.org/download.html which was causing the bottleneck.

Setting up a subversion mirror repository using svnsync

With the new version of subversion 1.4 you have a new tool called svnsync with which you can maintain mirror repositories quite easily. I’ve been working on one at work and would like to share with you my findings in case it interests anyone :-) Understanding the problem In order to have a mirror repository, it is important that commits only happen on the master and then they are synchronized to the mirror using the svnsync program.

Mini tutorial on gdb

Thanks to Matthew: gdb --args program/to/debug --whatever break Foo.c:532 # to put a breakpoint at line 532 of Foo.c run # to run it, until it hits that line bt # to display the stacktrace (backtrace) frame 2 # to change the stack frame you're looking at list # to list the sourcecode for that stack frame step # to step into the next command for that frame next # to run the code to the next command continue # to continue onwards print bar # to print the contents of variable bar printf "%08x", bar # standard printf for bar delete 2 # to remove the 2nd breakpoint Obviously, you need to compile things with -g as an argument to GCC.