Printing with lpr
Wednesday September 12th 2007 ..
Filed under: Logged Important Stuff

Fuckin’ printer’s giving me a hard time again.
Managed to print a wacky pdf with xpdf using: lpr -P within xpdf.

Comments Off


Lock failed
Wednesday April 18th 2007 ..
Filed under: Logged Important Stuff

java.io.IOException: Lock obtain timed out

I aborted a bash removal of dspace items and from there on I couldn’t interact no more with DSpace from the bash… I dug a little and the problem is that some indexes where messed up. The solution:
dspace_home: rm search/*
dspace_home: bin/index_all

Comments Off


Pcmcia card reader
Wednesday April 11th 2007 ..
Filed under: Logged Important Stuff

Just in case I need it again.
This worked for me like a charm.

/dev/hde1 /media/pcmcia vfat user,noauto,umask=000 0 0

Comments Off


Hostnames
Tuesday April 03rd 2007 ..
Filed under: Logged Important Stuff

Because I’ve been messing around with both my machine’s hostname and a VM’s one, I thought I should log this… just in case.

Changing the ‘hostname’ (debian/ubuntu)

Change the file /etc/hostname to whatever you want, and run

/etc/init.d/hostname.sh start

It’s done.

NOTE: For some stupid reason, dapper does not send any hostname information to the dhcp server by default. This means that your hostname will NOT get resolved in the network.
To fix this, uncomment the “send host-name …” line in /etc/dhcp3/dhclient.conf.
I’ve also read that one should comment the “host-name” part from the request bellow in the file, but I didn’t.

Changing the ‘hostname’ (RH4/SciLinux – in my case, a VM running locally with a bridged connection)

Change the /etc/hosts and /etc/sysconfig/network.

I think this was all.

Comments Off


Depois de um SysFuCup
Monday April 02nd 2007 ..
Filed under: Logged Important Stuff

Fiz um SysFuCup no outro dia ao tentar “subir” para o Edgy. PQP.
Como tal tive que refazer algumas coisas.

A partir de agora vai ser tudo com virtualização.

É melhor loggar isto: som do jack dos fones não funciona de origem no Ubuntu Dapper. Porquê?
Porque me falta uma linha no
/etc/modprobe.d/alsa-base

Nomeadamente:
options snd-hda-intel model=z71v position_fix=1

Comments Off


Shape parameters
Thursday January 11th 2007 ..
Filed under: Ajax

To change a shape parameters, say, a line, use:

line.setShape({x1: 0, y1: 0, x2: 20, y2: 20})

Too bad this isn’t present in any documentation that I could find!!!
BTW, gfx.Shape API is nowhere to be seen! It makes it really hard to code this way…

Comments Off


Dojo: shape border
Thursday January 04th 2007 ..
Filed under: Ajax

After getting a shape pointer, change its border color and width like this:


var shape = getShape(event);
shape.setStroke({color: "red", width: 2});

Comments Off


Dojo: ContentPane
Thursday January 04th 2007 ..
Filed under: Ajax

When getting a widget by id, I should use:

dojo.widget.byId(_id_)

Despite this being a rule, I came across the stupid behavior, just as follows:

<script>
container = dojo.byId("gfx_holder");
warning_container = dojo.widget.byId("upper_menu");
</script>
<html>
<div id="gfx_holder" dojoType="ContentPane" ...
<div id="upper_menu" dojoType="ContentPane" ...
</html>
</div></html></code>

container does not work if dojo.widget.byId is used.
warning_container does not work if dojo.byId is used.

So I need to remember to USE BOTH METHODS...

Comments Off


Unrar
Monday July 24th 2006 ..
Filed under: Logged Important Stuff

Being sick of the “failed” return on with the unrar-free command, I seeked something else.
Found this.


$ cp makefile.unix Makefile
$ make
$ sudo cp unrar /usr/bin/

Now unrar e $filename et voila.

PS:. I could supposedly apt-get unrar-nonfree, but I can’t find no installation candidate.



Day 27
Friday March 24th 2006 ..
Filed under: @LNEC, Logged Important Stuff

I forgot to post yesterday that I finished the presentation. I’m still waiting for LAC’s judgement, though. Of course, between giving a hand to Antonio, Dora e João, and helping out Victor with his zope there was no time for the workflows…
The workout was good, and I feel I’m getting used to it.

8:25
I’ve arrived. It’s not raining today, wich makes me happy and hopefull for the weekend.
Sandra’s arriving today at about 5pm. I’m dropping off work earlier
too, to pick her up at Sete Rios, and Faria’s camera at Secil (oh… CCCCCCCCCCecil!).
And then… off to São Pedro de Moel.

For now, workflow is first on the menu!

9:00
Faria’s getting his new “friend” today. Watch out for the backseat stains dude :P

I’ve just started to download the 16 episode of “LOST”. UUUUU, can’t wait…

11:45
To help me debug some zope stuff I’ve installed a python command line completer. Also installed DocFinderTab, to get the zope methods for almost every object.
These two combined are a great way to understand the inner workings, and do some serius scripting.

13:30
“Bacalhau à Florentina”… huuuumm huumm!

The “LOST” episode is here already. Good! Maybe I’ll watch it today… Hum, and then again, maybe not!

14:30
I think I should log the rlcompleter installation since it was a little different this time.
So, here’s what I did:

Created the file /home/rg/.pythonstartup with the following code:

import pydoc
import inspect
import rlcompleter, readline
readline.parse_and_bind('tab: complete')
def source(obj):
"""source of the obj."""
try:
pydoc.pipepager(inspect.getsource(obj), 'less')
except IOError:
pass

The “PYTHONSTARTUP” environ var is really important, so:

export PYTHONSTARTUP=/home/rg/.pythonstartup

Also added this to my .bashrc, obviously.

To force .pythonstartup to be loaded everytime a debug session of zope is started, I edited /opt/Zope-2.8/lib/python/Zope2/Startup/zopectl.py (line 169), replacing:

'import Zope2; app=Zope2.app()'

with:

'import Zope2; app=Zope2.app(); execfile(\'/home/rg/.pythonstartup\')'

16:00
Time to go.
Cya next monday…