Skip to content

Vim remap ex-mode key

I’ve become in the habit to miss shift-a in vim (edit at end of line), and instead pressing shift-q which brings you to the ex-mode. To get out of that, you need to type the command “visual“. Quite long and annoying.

Quick look at the help pointed me to the vimrc_example.vim (:help vimrc_example.vim). And this nifty remap:

map Q gq

Problem solved!

Having fun with IRC daemons

Sooo.. after a talk with my boss, I decided to implement one of the things he once did. An IRC server module which on connect gives you a random 3L1t3 hackers handle.

1245 -!- Code-dUde [] has joined #darkwired
1245 -!- fast-Fate [] has joined #darkwired
1245 -!- wet-chillA [] has joined #darkwired
1245 -!- Crash-mC [] has joined #darkwired
1245 -!- Crash-Hate [] has joined #darkwired
1245 -!- e-dieteR [] has joined #darkwired
1245 -!- Ghetto-dUde [] has joined #darkwired

m_conn_leethandle.cpp (.bz2 11KB) for download.
Installation

New IRC daemon

Today I switched the IRC Daemon on darkwired. From old unreal to the shiny new inspircd. Inspircd is pretty easy to configure although it is a pretty big config, it is quite easy to understand and it did not take long to get it up and running. Big plus on that one!

Ofcourse no first configuration is perfect and as soon as the membrane users joined in, we all got z-lined because we all came from the same host. Fixed that easily by searching on zline in the config file and came to the exception rules.

Inspircd is pretty cool stuff with its modular approach that can load and unload modules at runtime! Someone requested to have hostname masking, configured it, /rehash and tell him to do /mode nick +x. And we have a happy user!

Germans and my Name

Germans are used to Johann I guess… But alas, my name is still Johan without the second n.

Violation

I am in violation of german law:

http://kismac.de/

My German phone number

Keeping up with the one post per month… I present:

My new German Mobile phone number!

  • 0049 17696209986

Still using my old P900 for this. My dutch number is out of service until I find a good phone for it. (switching Sim’s once in a while) using a way back old phone for my dutch one.

Nginx userdir list

Our Nginx server was without a proper ~user listing. While this is default in most apache configs, its not in Nginx. My friend Dominiek made a hack with a ruby script. This would have worked fine if had some more work but memory usage was pretty bad (especially for big files).

So, I started on a proper Nginx way to solve this and harness it’s power. By diving into the config I figured it out:

# the [a-zA-Z0-9] is for the greedy .
location ~ /~([a-zA-Z0-9]*)/(.*) {
root /home/;
autoindex on;
index index.html;

rewrite ^/~(
[a-zA-Z0-9]*)/(.*)$ /$1/www/$2 break;
}

Put this small snippet into the server config where you want userdirs enabled and enjoy your apache like mod_userdir.

Edit: made it work with subdirs
Edit: took advice of beate (see comments)

Tagged , , , ,

Vim tags not sorted error

Vim has a pretty nice (although not that smart) completion command, Ctrl+n.

Lately I’ve been getting this error:

 E432: Tags file not sorted

This error is pretty annoying as it interrupts your work with an error. Googeling for this gave me no solution. Then I searched for files named tags (which are a lot), and I found a file in my home dir ~. I deleted that file and the error was gone.

The lesson was:
NEVER put a tags file in your home dir!

Tagged , ,

As I keep working on school projects getting my points. As I’m getting more and more familiar with ReST, I like it more and more! But I’m also becoming more and more aware of its limitations. Don’t get me wrong, ReST will do everything for most document needs, but it lacks features to be used for scientific papers. It also lacks a page break function, which i miss. Now i need to export the document to LaTeX and make some modifications there, which is far from ideal. BUT! It’s a lot better than writing the entire document in LaTeX myself.

Anyway, this post was to let you see http://rst2a.com/ . A cool project to make converting ReST to html and PDF easy. It also has more styles available than default ReST. I’s easy quick and painless.

Tagged ,

Mouseless Xorg, numpad!

Don’t have a mouse? Want to move that pointer anyway? Press shift+alt+numlock and press the numpad keys to move your pointer!

1 2 3 4 6 7 8 9 are the direction keys, 5 is a click. 0 (zero) is press and hold, the . key is release.

On the top are the mouse buttons: / for left * for middle and - for right. These select the type of button is used when you press 5.