quinta-feira, fevereiro 21, 2008

Agora tenho um celular!

Eis que comprei meu primeiro celular ontém. Um W200i. Atualmente o telefone com walkman mais barato e simples por aí: R$200.

terça-feira, janeiro 29, 2008

Usando layout russo fonético em teclado abnt-2


setxkbmap -model abnt2 -layout 'ru(phonetic),br(abnt2)' \
          -option grp:caps_toggle
Assim é possível aproveitar a famigerada tecla Caps Lock para alternar entre os layouts. Tem quebrado o galho até agora.

Não esqueça de usar br(thinkpad) caso tenha a sorte de ter um T60 brasileiro.

Atualização (jun/2008): agora virei preguiçoso e uso a ferramenta de gerenciar layouts de teclado do KDE. Usando ctrl-alt-k posso alternar entre os teclado ucraniano fonético (que era o que realmente interessava) e o br(thinkpad). Um pouco mais fácil.

Atualização (set/2008): caso precise usar o layout ucraniano fonético no Vindows (por não ter um Pendriva para quebrar o galho), recomendo este driver.

terça-feira, novembro 20, 2007

Git patch: don't complain about ignored paths in pathspec

This patch does what the title says.

It is far easier for git to know what are the ignored files than to the caller of git to figure out what should not be put in the command line. It makes easier to use git with my scripts.

quarta-feira, julho 25, 2007

Weird behavior of Lua RPM scriptlets

RPM allows packagers to write scriptlets and macros in specfiles using the Lua language. That's a really nice feature but seems nobody is using it and thus it is not being properly tested:
$ rpm -q --qf '%{VERSION}\n' --specfile teste.spec
error: line 8: Unknown tag: ðâ
error: query of specfile teste.spec failed, can't parse
$ cat teste.spec
%{lua: print("Name: foo") }
%{lua: print("Version: bar") }
Release: 1
Group: Foo/bar
License: GPL
Summary: summary
Buildroot: %_tmpdir/%name
Note the unknown tag rpm is complaining about "ðâ", which seems to be gargabage. It happens always when calling print more than once and can't be reproduced with "rpm --eval". Really weird.

My dirty workaround was to append all needed lines in a table and then dump all these lines with only one call of print().

segunda-feira, julho 09, 2007

Some reasons to use (g)make

The following excerpt from the ISconf history describes well why I like make(1) for writing scripts:
Its functionality is dependent on three key features:
  • Deterministic Ordering
  • Failure on error
  • State maintenance
Because make is the only tool that fulfills all of these requirements in its default state, it was chosen as the basis for ISconf.
I think make(1) is specially good for those scripts that will be called directly from the command line.

sexta-feira, junho 01, 2007

svnperms.py to query LDAP groups

Just to be make it searchable: there's one modified version of Gustavo Niemeyer's svnperms.py that can retrieve from LDAP those groups referred in svnperms.conf ACLs. It was requested and/or specified by Andreas Hasenack and I wrote the code (you can blame me for the bugs).

Here: http://svn.mandriva.com/svn/soft/build_system/svnperms/. There's one bzr branch with more detailed history here. You can also read the README.

quarta-feira, janeiro 17, 2007