Kategorien: development, html / css, JavaScript, php, b2evolution

11.03.09

Whissip.net

Link: http://whissip.codeprobe.de/

Registered my first .net domain today: whissip.net

This will host information about the b2evolution branch I'm maintaining.

Update: I've scheduled the domain for deletion now. The site's hosting has moved to whissip.codeprobe.de.

See also whissip's ohloh entry with information about code history etc.

By Daniel in b2evolution2009-03-11 English (EU) Email

19.02.09

Vim settings per directory

When hacking on b2evolution using vim, I often forget to ":set noet" (to not expand tabs) and it's really annoying to change this global setting everytime I open a b2evo related file.

According to the mantra, to search for a shortcut when a task becomes repetitive, I've finally searched for it and found a plugin, which looks for _vimrc_local.vim files (in the parent directories (and $HOME)).

Now, I can have a single _vimrc_local.vim file in the directory where all my b2evo related directories/branches reside - and override my global settings therein; It gets sourced/executed whenever I'm opening a file "below".

For more information see the Question on Stack Overflow and the actual plugin by Luc Hermitte. Thanks! :)

Update: as noted on Reddit, you could also use the following code in a vimrc file (e.g. ~/.vimrc):

:au! BufRead,BufNewFile /path/to/project/* setlocal noet

I still like the approach of having local override files in the directory structure though, which might come in handy for projects: if somebody has installed the plugin already there's no need to edit any .vimrc file (if the project ships the _vimrc_local.vim file in the project's root directory).

05.02.09

bzr-pager Plugin

I like the feature in git, where commands that produce long output get piped to $PAGER.
This means, that if you do a "git diff" and its output will not fit into the current terminal window without scrolling, it will get piped to "less" by default, so that you can easily search and scroll in the output. Additionally (and that's the main point IMHO) it does not pollute your scrollback history (when you exit from your pager, the terminal will only display the call to the command, but not its output).

Luckily, there's a plugin for bzr, which provides the same functionality: bzr-pager

You can install it as follows:

mkdir -p ~/.bazaar/plugins && \
cd ~/.bazaar/plugins && \
bzr branch lp:bzr-pager pager

By Daniel in development, Ubuntu, musthaves2009-02-05 English (EU) Email

12.10.08

Clean URLs with lighttpd

To get clean URLs (e.g. for permalinks) in Lighttpd, you have to use the magnet module (lighttpd-mod-magnet in Ubuntu/Debian), and a Lua script.

I've created a file /etc/lighttpd/rewrite-to-docroot.lua:

if (not lighty.stat(lighty.env["physical.path"])) then
    lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. "index.php"
end

And enabled it using:

magnet.attract-physical-path-to = ("/etc/lighttpd/rewrite-to-docroot.lua")

This simulates the following mod_rewrite snippet known from Apache:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Previously I was using a tricky method, which would use the 404 handler ("server.error-handler-404 = /index.php"), but this caused missing GET params (as documented in the Lighttpd FAQ).
As a result, paged browsing of categories and tags wasn't possible.

26.06.08

Besserer Name als "b2evolution"?

Ich suche nach einem neuen Namen für die Software, die diese Seite steuert.
Bisher heisst sie "b2evolution", aber das ist doch eher merkwürdig und ihr habt sicher einen besseren Namen anzubieten.. :)

Spontane Stichwörter: "free speech", "dada", "words".

Sehr gerne auch ein total neues Kunstwort, z.B. "Goohoo!" oder sowas.

Es geht darum, dass ich ziemlich viele Sachen am Köcheln habe, die (noch nicht) ins offizielle Projekt passen und dem ganzen ("Fork"/Abzweigung) deswegen einen eigenen Namen geben möchte.
Und ein neuer Name wäre auch für das Hauptprojekt interessant.. :D

Wenn da nix bei rumkommen sollte, werd ich es wohl einfach über die Versionsnummer machen - aber das soll euch nicht von schönen Vorschlägen abhalten.

Von Daniel in development26.06.08 German (DE) E-Mail
Schlagworte:

16.02.08

Launch a webserver in the current directory

Use case: you want to start a webserver in a given directory, to serve some files from there temporarily.

How many lines of code do you need (including editing config files) to start a webserver in the current directory?

The best answer is probably "one":
python2 -m SimpleHTTPServer

For Python 3:
python3 -m http.server 8000

(via comment in "15 Line HTTP server").

Python (with batteries, like web server interfaces, included) is just awesome :)

By Daniel in development, Snippets2008-02-16 English (EU) Email

10.12.07

OpenID 2.0 freigegeben

OpenID logo

Die Spezifikation für OpenID 2.0 wurde endlich freigegeben.

Dies habe ich natürlich zum Anlass genommen, das OpenID Plugin für b2evolution zu aktualisieren.

Der (schon lange existierende) OpenID 2.0 Entwurf wurde zwar vorher schon von dem Plugin unterstützt (bzw. von der verwendeten Bibliothek), aber die letzten Änderungen in der zugrunde liegenden Bibliothek und dem Plugin selber sollten insgesamt zu einem noch besseren Single-Sign-In-Erlebnis führen.

Von Daniel in b2evolution, OpenID10.12.07 German (DE) E-Mail
Schlagworte: ,
Seitenleiste