Posts Tagged ‘tip’

Posting to pastebin from git

Thursday, February 11th, 2010

I usually need to show someone a simple patch from a local git repo, my method was to run git format-patch and upload the result to my gnome.org userdir with a script conveniently called internets. This of course filled my userdir with garbage in the long run and also was a multiple step process.

So today, after a quick apt-cache search, I installed pastebinit, but then my problem was that there is no glue between this tool and git. Some googling took me to mentions of git-porcelains but I didn’t want to install that so I tried something simpler, a git alias.

I crafted this line for .gitconfig:
pastebinit = !sh -c 'git format-patch -1 –stdout $1 | pastebinit -f diff' -

Update: Ray and Pablo shared some ideas in the comments, the alias is updated, thanks!.

That I can use like this:
git pastebinit [commit]

It runs and outputs the url of my new pastebin’d code :-) . I’m happy with it, but open to suggestions. Hope it’s useful for someone.

Slow X rendering with sis driver

Monday, April 14th, 2008

Everything slow when using X with the sis driver? Well, here it’s awfully slow, made me want to trash my old pc… but then I discovered this bug in Launchpad : lp #26637.

Turns out that vesafb and vga16fb modules are responsible for this chaos. They seem to be stealing the memory managemen and hence making sis driver impossible to use due to it’s lack of descent performance.

What’s the fix? Blacklist vesafb and vga16fb and add sisfb to /etc/modules. You can try to add video=sisfb in the boot line of the kernel (grub’s menu.lst) too.

Note that Fedora doesn’t have sisfb built and is forcing vesafb into the kernel for it’s graphical boot. Ubuntu is doing the same, but they also build sisfb as a module.

So if you are using Fedora, you are screwed unless you rebuild your kernel, if you are using Ubuntu or Debian, make sure vesafb is not loaded (nor vga16fb) and have sisfb loaded sometime before X starts.

How can you be sure it worked? Grep /var/log/Xorg.0.log for ‘memcpy’ and see if the MB/s rate is descent, you can try with and then without the sisfb module to check if it’s making a difference. Here it does.