So I made up a patch to lighttpd to allow the xattr Content-Type override anything in the configuration file. Here it is.
EDIT: A similar patch has been applied to the lighttpd trunk at r2425
Friday, January 23, 2009
Thursday, January 22, 2009
merged the getopt and mlock patches
I merged the getopt_long patch and the mlock patches (since they modified the same code).
I cleaned up the patch a bit. It now is enabled via the configure script with the --enable-mlock flag, the flag is now -m/--mlock (instead of -l/--lock).
The configure script also now checks for the presence of mlockall, and checks that glibc is >= 2.5 (the version the mlockall bug was fixed), and disables the mlockall if it is not met. It does the same for getopt_long and the use of getopt.
I also added documentation for --mlock to the manpage.
I renamed --opendisplay to --open-display (opendisplay is improper english). The documentation does not mention it, but --opendisplay will still work for backward compatibility.
Note that for the manpages, I updated the rxvtd.1.pod file, so the rxvtd.1.man.in file will need to be regenerated.
The new patch is here
Edit: It was merged upstream... it should be available when you --enable-frills in the next release.
I cleaned up the patch a bit. It now is enabled via the configure script with the --enable-mlock flag, the flag is now -m/--mlock (instead of -l/--lock).
The configure script also now checks for the presence of mlockall, and checks that glibc is >= 2.5 (the version the mlockall bug was fixed), and disables the mlockall if it is not met. It does the same for getopt_long and the use of getopt.
I also added documentation for --mlock to the manpage.
I renamed --opendisplay to --open-display (opendisplay is improper english). The documentation does not mention it, but --opendisplay will still work for backward compatibility.
Note that for the manpages, I updated the rxvtd.1.pod file, so the rxvtd.1.man.in file will need to be regenerated.
The new patch is here
Edit: It was merged upstream... it should be available when you --enable-frills in the next release.
Wednesday, January 21, 2009
rxvt-unicode and getopt
Pissed at Lighttpd
I'm so pissed at lighttpd... they have a feature where you can use xattrs to set the mime type of a file... but you can't *change* it. At least in debian, there is a script which parses /etc/mime.types and includes them in the config file. I checked the lighttpd code, and if the mime type is set in the config file, an xattr does not override it. This seems to be intentional too. WTF! What if I want a .patch file to appear as plain text? I would have to change the config file!
Maybe i'll change it and build my own debian package.
Edit: I did fix it, and built my own debian package. Here is a patch.
Maybe i'll change it and build my own debian package.
Edit: I did fix it, and built my own debian package. Here is a patch.
Locking applications in memory.
Have you ever been using your computer, and all of a sudden, everything locks up? How about everything just gets really slow? Anyone remember the warning that the early versions of Windows would give you about being "out of virtual memory"? Well I still see this problem. For me, Firefox periodically tries to take >2gb of ram[1]. Since my machine only has 2gb of ram, when that happens, my computer slows to a crawl or even locks up until it is out of swap and the kernel kills firefox.
Usually, the only thing I want to do when my computer starts slowing down is find out the culprit and kill it. All I really need for that is my terminal[2]. So I thought "I wonder if it is possible to prevent my terminal from being swapped out?" With some investigation, I discovered mlock(2) which allows you to do just that! So I just modified my terminal a bit so that it mlocks itself when it starts.
Now my terminal is a little special. I use rxvt-unicode which includes a special two part option: a daemon, and a client. The daemon sits in memory with a full working copy of the terminal, and the client just spawns new instances of that background terminal. The benefit of this is twofold: one, faster bootup... when you start a new client, it only has to read ram to start, instead of having to read from the disk, and two, the read-only parts of the terminal can be (and are) shared among all the clients.
So what i'm saying is that I didn't actually modify the terminal, I modified the daemon. So the patch here modifies the daemon to add the -l or --lock option which calls mlockall to lock itself in memory.
Usually, the only thing I want to do when my computer starts slowing down is find out the culprit and kill it. All I really need for that is my terminal[2]. So I thought "I wonder if it is possible to prevent my terminal from being swapped out?" With some investigation, I discovered mlock(2) which allows you to do just that! So I just modified my terminal a bit so that it mlocks itself when it starts.
Now my terminal is a little special. I use rxvt-unicode which includes a special two part option: a daemon, and a client. The daemon sits in memory with a full working copy of the terminal, and the client just spawns new instances of that background terminal. The benefit of this is twofold: one, faster bootup... when you start a new client, it only has to read ram to start, instead of having to read from the disk, and two, the read-only parts of the terminal can be (and are) shared among all the clients.
So what i'm saying is that I didn't actually modify the terminal, I modified the daemon. So the patch here modifies the daemon to add the -l or --lock option which calls mlockall to lock itself in memory.
Tuesday, January 20, 2009
My Resume
So I decided I need to update my resume. But i've been playing with LaTeX lately, and so I figured i'd do it in LaTeX. What's latex you may ask?
Latex is a typesetting package that allows you to write really pretty documents. here's one I wrote for my biology lab. Everything except the graph is latex. This is the document that made it.
So, short story short, my resume is now here.
Latex is a typesetting package that allows you to write really pretty documents. here's one I wrote for my biology lab. Everything except the graph is latex. This is the document that made it.
So, short story short, my resume is now here.
Tuesday, November 25, 2008
Bought a Domain
So I finally bought eatnumber1.com... i've been looking at it since I was like 14.
Many people have asked me "why eatnumber1... what does it mean". The answer is *drum roll* nothing! Eatnumber1 is a name I came up with when I was signing up for AOL when I was like 8 years old, and couldn't think of anything else that wasn't taken. The really good thing about it, and the biggest reason I keep using it is because nobody... absolutely nobody... uses it but me, so I can always know that if I go to a site, I can sign up on the site using eatnumber1.
So now that I have eatnumber1.com, I've setup a few things... Google's management of a few of the subdomains (mail.eatnumber1.com, calendar.eatnumber1.com, blog.eatnumber1.com, etc...), and I pointed a few other subdomains at my various computers. My only complaints are that Google's domain services don't have things like Gmail labs, or any of the latest Gmail features in fact. To get around this, I forwarded all the mail to russ@eatnumber1.com (my new primary email address) to eatnumber1@gmail.com (my old primary), registered russ@eatnumber1.com with gmail, and set it as my primary. So now, I login to eatnumber1@gmail.com, but can treat it as if it was russ@eatnumber1.com. My other complaint is with dns hosting. I wanted to get a host with dynamic dns support so I could give my systems with dynamic ips (laptop) a subdomain, but Godaddy (my registrar) doesn't support it. The only dns host I could find that would host a tier 1 domain that supported dynamic dns for free was dnsexit, and they required that you put a link to them on your website... since i'm not pointing eatnumber1.com at anything, there is no website to put a link to. Also, I later found out that they don't support SRV records which I need to play with google's custom domain google chat services. So now, i'm just using Godaddy for dns (I actually like their custom DNS interface), and the only complaint I have with them is that they don't support dynamic DNS.
Many people have asked me "why eatnumber1... what does it mean". The answer is *drum roll* nothing! Eatnumber1 is a name I came up with when I was signing up for AOL when I was like 8 years old, and couldn't think of anything else that wasn't taken. The really good thing about it, and the biggest reason I keep using it is because nobody... absolutely nobody... uses it but me, so I can always know that if I go to a site, I can sign up on the site using eatnumber1.
So now that I have eatnumber1.com, I've setup a few things... Google's management of a few of the subdomains (mail.eatnumber1.com, calendar.eatnumber1.com, blog.eatnumber1.com, etc...), and I pointed a few other subdomains at my various computers. My only complaints are that Google's domain services don't have things like Gmail labs, or any of the latest Gmail features in fact. To get around this, I forwarded all the mail to russ@eatnumber1.com (my new primary email address) to eatnumber1@gmail.com (my old primary), registered russ@eatnumber1.com with gmail, and set it as my primary. So now, I login to eatnumber1@gmail.com, but can treat it as if it was russ@eatnumber1.com. My other complaint is with dns hosting. I wanted to get a host with dynamic dns support so I could give my systems with dynamic ips (laptop) a subdomain, but Godaddy (my registrar) doesn't support it. The only dns host I could find that would host a tier 1 domain that supported dynamic dns for free was dnsexit, and they required that you put a link to them on your website... since i'm not pointing eatnumber1.com at anything, there is no website to put a link to. Also, I later found out that they don't support SRV records which I need to play with google's custom domain google chat services. So now, i'm just using Godaddy for dns (I actually like their custom DNS interface), and the only complaint I have with them is that they don't support dynamic DNS.
Subscribe to:
Posts (Atom)