Index ¦ Archives ¦ RSS > Tag: en

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. ;-)


Navigation in big if-then-else code chunks

Estimated read time: 1 minutes

So when trying to understand others' code, and they use large while/for/if blocks, it's hard to see where one if ends, unless it's on the same page so vim highlights it. I remembered already once that there is a char to jump to the start { of such a block from its end } and vica-versa, but I forgot it, so now I had to look it up again. It's '%'. :-)

read-only s/mime support in mutt

Estimated read time: 1 minutes

So my problem was that I already set up PGP, and I use it for sending / receiving signed (and sometimes crypted) messages. Today I received an S/MIME signed message and I had to verify it.

First mutt just bailed out with "Can't verify S/MIME signature", but that was because S/MIME was not configured. Here is what I did:

cd ~/.mutt
cp /usr/share/doc/mutt-ng/samples/smime.rc .
# edit muttrc to source it

I thought that will be enough, but that was too aggressive.

First, it disabled my PGP support. I had to put 'unset smime_is_default' to the top of smime.rc.

Second, it tried to verify the whole damn cert chain, which is simply something I can't really care, as the cert is a self-signed cert anyway. To do this, I had to uncomment the last two lines in smime.rc (set smime_verify_command/smime_verify_opaque_command).

So far it works just like I wanted it! :)


freenx server fontpath

Estimated read time: 1 minutes

I wasted some hours debugging till I found out how to set the fontpath of a freenx-server if not using XFS.

Basically just need to fine-tune /etc/nxserver/node.conf:

DEFAULT_FONT_PATH=$(echo $(grep -v '^ *#' /etc/X11/xorg.conf | grep FontPath | awk \
'{print $2}' | sed -r "s/^[\"']|[\"']$//g") | sed 's/ /,/g')
AGENT_EXTRA_OPTIONS_X="-fp $DEFAULT_FONT_PATH"

Based on this post.


scooter rss

Estimated read time: 1 minutes

I just noticed that scootertechno.com has no RSS, so I wrote one. Available here, or in "binary form", here.

Project-specific vim settings

Estimated read time: 1 minutes

So swig uses two spaces instead of tabs, horrible. But I'll get used to it - just I don't want to fuck up my vimrc just because of their idiotic settings.

Here is the trick:

au BufRead */swig*/* set tabstop=8 | set shiftwidth=2 | set softtabstop=2 | set expandtab " SWIG
au BufRead */swig*/Source/* set tabstop=8 | set shiftwidth=2 | set softtabstop=2 | set noexpandtab " SWIG Source
au BufNewFile,BufRead *.i set filetype=swig
au BufNewFile,BufRead *.swg set filetype=swig

The swig syntax file is here.

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