Nginx userdir list
5 Comments

Posted by Drakonen on February 29, 2008 in Programming, Tech | Short Link

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)

Tags: , , , ,

Vim tags not sorted error
4 Comments

Posted by Drakonen on February 12, 2008 in Programming, Tech | Short Link

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!

Tags: , ,

No Comments

Posted by Drakonen on November 28, 2007 in Tech | Short Link

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.

Tags: ,

Mouseless Xorg, numpad!
No Comments

Posted by Drakonen on November 11, 2007 in Tech | Short Link

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.

ReST experience
No Comments

Posted by Drakonen on October 9, 2007 in Uncategorized | Short Link

I’ve been playing with Restructured Text for a bit, and it was a very pleasant experience, unlike latex. ReST has a nice readable source, and the source file itself is very suited for distribution. When needed you can convert it to HTML and latex. ReST is very suited for HTML, and as it is one of the most prominent standards this day, I see this as a good thing.

This does not mean that it cannot be used for printing, the HTML it generates is very suited for printing, but if you want a more “professional” layout you can easily convert it to tex.

ReST has many advantages over tex of you’re writing normal documentation (like most texts) without any mathematical markup. The code to make a ReST document is easy, clean and easily comprehensible. Layout options are plenty, not too much, not too many. I will doubt that I will run into a limitation soon. The only thing it misses is a table of contents generator, but that can be solved by using tex. It even has a table of contents generator, which automaticly makes links inside the document.

I see ReST as a nice alternative to tex, or at least a better beginning for writing pieces of text.

P900, linux and connection to the internet
No Comments

Posted by Drakonen on July 20, 2007 in Connectivity, p900, Tech | Short Link

I got an unlimited gprs/umts plan for my P900 a while ago, so I wont be needing a windows pc anymore to connect to the internet. What would be nice though is connecting from my laptop to the internet using my P900. I found this site which seems to do the trick pretty well. More when i have tested it!

Also, i can really recommend Opera mini as a fast internet browser. I’m currently running the beta for 4, Which is working great for me so far.

Found a somewhat better SSH client too. Its mostly the same as the previous one I was using, but i like this one a bit better. Still no page up and page down though so I can scroll in irssi.

A good programming language…
1 Comment

Posted by Drakonen on July 18, 2007 in Uncategorized | Short Link

A good programming language does not need a lot of books to explain the language.

Playing Half-life 2 with NAT on the same server
No Comments

Posted by Drakonen on July 9, 2007 in Uncategorized | Short Link

For the ones with the same problem me and my brother are having in Half life 2 when connecting from the same external ip, behind NAT, getting disconnections when the other one joins the same server:

clientport 27006
or any other number then 27005

If you want this to be executed by all mods on startup you have to create a autoexec.cfg containing the previous command in every mod config dir found at:

C:\Program Files\Valve\Steam\SteamApps\<username>\<game>\hl2\cfg

Special attention goes to

C:\Program Files\Valve\Steam\SteamApps\<username>\source sdk base\hl2\cfg

as this one is used by a lot of mods as a basis and thus the autoexec.cfg get executed by a lot of games.

Happy fragging with your internet connection sharer!

Registering in is sooo web 1.0
No Comments

Posted by Drakonen on June 9, 2007 in Connectivity, rant, Site, Tech | Short Link

I’m really fond of anonymous or non-registered web sites. If you can please do it, and devise some smart way to not make people to have to register. Registering on yet an other site is annoying and most of the time its totally useless. I don’t want to register just to read your site. This is probably one of the reasons why bugmenot is popular.

But for most interaction you do not need registering either. At some web stores you can make an order by just filling out your personal information, no registering required. This making it easier for other people to contribute or buy. I plan on doing this on my new project, which I will uncover later.

I read some articles about how great OpenID is, and that this makes the login procedure easier, but why not allow anonymous comments on blogs (what it seems to be used the most for) instead of offloading your registration to an other party. OpenID is a big scam to give to phishers something nice to do and make their lives a lot easier.

The thing that came before me
No Comments

Posted by Drakonen on June 8, 2007 in Personal | Short Link

My dad is becoming an old man but has a blog! Sometimes it has some nice projects and recommendations. It’s a nice read.

Copyright © 2005-2012 Draakwired All rights reserved.
The Shades theme, version 1.7, is a BuyNowShop.com creation.

Social links powered by Ecreative Internet Marketing