Index
Index
Conkeror, Firefox, Gentoo and "Could not read configuration file"
If you use conkeror and Gentoo, and get an error saying "Could not read configuration file, please contact your administrator" or similar, I found the solution.
The problem is that Gentoo locks some preferences (automatic
updating and such) in a startup file called
local-settings.js. This, in turn, makes firefox read a file
called gentoo-all.js. This is not a problem when running plain
firefox.
However, when using the -app switch, something breaks, and firefox
looks for the gentoo-all.js file in the conkeror installation
directory instead of /opt/firefox.
So the solution is to copy the gentoo-all.js file to your
conkeror installation directory.
This cost me a pretty afternoon, so I hope I could help anyone with this.
Setting up an IPv4-in-IPv6 tunnel in Debian
Yes, it's a new entry! This time, it's on IP tunnelling and how to set it up. See it here!
Dotless I on Nokia e71
Quick tip: If your Symbian phone has suddenly started to type an "ı" (a dotless i) instead of a regular one, press the "function" key (bottom left) and space, and select the correct input language (not turkish). Took me several days and a lot of work to find that out.
Git repositories missing
Due to a little post-privacy fuckup by yours truly (ehem), I have taken the repositories offline temporarily. Hopefully, they'll be back soon.
Update: Aaand they're back. Thank god for git –filter-branch.
My emacs configuration
Since my emacs configuration file is no longer a big blob of text (took me all day to untangle it), you can now git-clone it from https://thenybble.de/repos/emacsconf.git/, or look at it here.
Instructions: Check it out, then run git submodule init && git submodule update in the .emacs.d folder. Then, if you want to use wanderlust, install SEMI and FLIM. If you want AuCTeX, install it (all from the distribution packages). If you want to disable certain packages, simply edit the site-local.conf config file and add (setq <package-name>-disabled t) to inhibit loading of <package-name>. Otherwise, on Windows you're in for some pain, and there is a computer name pasted over several files (need to remove that).
A short list of things I've bought and still enjoy
Might get bigger when I buy new stuff. Consider this a wholehearted endorsement by me. Go here for the list.
Perl coding guidelines for large projects
At work, I am currently working on a large(-ish) Perl project which needs to meet highest reliability standards. While coding, I have noticed some patterns which make finding and avoiding errors so much easier. So, here's my list (which will probably grow):
- Always print out '$@' when you catch a die.
- use strict and use warnings, but you already know that. Best if you have your editor automatically insert that snippet for you.
- Use perl object orientation. It makes dealing with many interrelating components way easier. If you don't know how to write obeject oriented programs in perl, read perltoot.
- Write tests. Even the simplest tests give me a warm fuzzy feeling inside when they pass. Test::Simple and Test::More are your friends here.
- Use a makefile. Stuff targets in there to execute all tests, syntax check your perl and distribute the program.
More stuff when I get to it.
Localized Emacs. Today: parse-time
To enable me to use german day and month names in org-mode, I had a line like this in my init file:
(mapc (lambda (x) (add-to-list 'parse-time-weekdays x)) '(("so" . 0) ("mo" . 1) ("di" . 2) ("mi" . 3) ("do" . 4) ("fr" . 5) ("sa" . 6))) (setq seeger-german-month-names '(("jan" . 1) ("feb" . 2) ("mär" . 3) ("apr" . 4) ("mai" . 5) ("jun" . 6) ("jul" . 7) ("aug" . 8) ("sep" . 9) ("okt" . 10) ("nov" . 11) ("dez" . 12))) (mapc (lambda (x) (add-to-list 'parse-time-months x)) seeger-german-month-names) (mapc (lambda (x) (add-to-list 'timezone-months-assoc (cons (upcase (car x)) (cdr x)))) seeger-german-month-names)
Unfortunately, this completely breaks most elisp using parse-time. So, instead, now I use
(mapc (lambda (x) (add-to-list 'parse-time-months x)) '(("jan" . 1) ("feb" . 2) ("mär" . 3) ("apr" . 4) ("mai" . 5) ("jun" . 6) ("jul" . 7) ("aug" . 8) ("sep" . 9) ("okt" . 10) ("nov" . 11) ("dez" . 12))) (mapc (lambda (x) (add-to-list 'parse-time-weekdays x)) '(("so" . 0) ("mo" . 1) ("di" . 2) ("mi" . 3) ("do" . 4) ("fr" . 5) ("sa" . 6)))
which works correctly with twittering-mode, at least (and perhaps gnus).
UPDATE: Yep, the above breaks gnus. The problem is that message-make-date, which actually shouldn't be localized, uses parse-time-weekdays and parse-time-months, which are localized. So, some more work is needed, along the lines of this:
(require 'parse-time) (require 'message) ;; Do this before setting the variables correctly. (setq parse-time-months-unlocalized parse-time-months) (setq parse-time-weekdays-unlocalized parse-time-weekdays) (defun message-make-date-localized (&optional now) "Make a valid data header. Uses localized values from parse-time.el. If NOW, use that time instead." (let* ((now (or now (current-time))) (zone (nth 8 (decode-time now))) (sign "+")) (when (< zone 0) (setq sign "-") (setq zone (- zone))) (concat ;; The day name of the %a spec is locale-specific. Pfff. (format "%s, " (capitalize (car (rassoc (nth 6 (decode-time now)) parse-time-weekdays)))) (format-time-string "%d" now) ;; The month name of the %b spec is locale-specific. Pfff. (format " %s " (capitalize (car (rassoc (nth 4 (decode-time now)) parse-time-months)))) (format-time-string "%Y %H:%M:%S " now) ;; We do all of this because XEmacs doesn't have the %z spec. (format "%s%02d%02d" sign (/ zone 3600) (/ (% zone 3600) 60))))) (defun message-make-date-unlocalized (&optional now) (let ((parse-time-weekdays parse-time-weekdays-unlocalized) (parse-time-months parse-time-months-unlocalized)) (message-make-date now))) (defalias 'message-make-date message-make-date-unlocalized)
This works with gnus as well.
Nokia + self-signed certificates
I have a Nokia E71 (great phone btw), and I had constant problems getting it to work with my IMAPS server. Today, I found the problem: You need to accept the root certificate for cacert.org. Then, the mail program won't ask about accepting the certificate anymore.
Simply download the certificate in DER format from here, mail it to yourself, open it on the phone and say yes to all ensuing dialogues.
For the record: The error reported (by dovecot) was
Apr 14 16:32:18 lvps87-230-95-74 dovecot: imap-login: SSL_accept() failed: error:140943F2:SSL routines:SSL3_READ_BYTES:sslv3 alert unexpected message [79.218.222.243] Apr 14 16:56:13 lvps87-230-95-74 dovecot: imap-login: SSL_accept() failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown [64.57.240.132]