Last week was rather eventful, the largest thing being the one thing I naturally forgot to write about (go figure…), my appointment as deputy coordinator of FSFE Sweden. This is nice
That has however meant that this week hasn’t seemed as eventful, and I don’t know, for some reason I got off to a really slow start of the week, the only worthwhile things to write about started happening this Thursday.
nginx and password-protected directories
My father asked me for help in getting a bunch of files in his possession, over to some friends of his (who are, to the best of my knowledge, as computer illiterate as he is).
This meant that my first idea, to just set up an FTP-account on my server and have them log into that and download the files, wouldn’t work. I would need something simpler, but still with restricted access.
Preferably they’d just surf to some place, enter a password, and download a zip-archive (since all Windows versions since XP handles zip-archives like compressed folders, this should fall into the realm of what a computer user should be able to handle).
Something like Apache’s htpasswd stuff. And I wanted to do it with nginx, because I really want to get better at using and working with it.
The first task, obviously, was to check if nginx had that capability at all (it has), and if so, how it works.
This post showed me that it was possible, and how to do it.
A note here though: I first tried to set a password containing Swedish characters (åäö) and this didn’t work at all.
I have been wrestling with the question of how I would manage to create a database which individual users can read from and write to, but which they shouldn’t be able to remove from the filesystem (I know, a DROP or DELETE command can be just as devastating, so I must continue thinking about this).
This however makes it impossible to add new files to the directory. But since I am working with the idea that there should be a “ticket” user with a corresponding “ticket” group, and that every individual who should have access to the tracker will be in that ticket-group, the directory could disallow writing for group and other, leaving the ticket-user free to create more databases…
Although I now realize that this would make it easy for anyone in the ticket-group to screw around with any ticket database (insert, update, delete).
This clearly needs more design thought put behind it.
ArchLinux and MySQL client binaries
I needed to interact with a MySQL database on another server, but MySQL (the server) wasn’t installed on my desktop, and I didn’t really want to have to install the entire server just to get hold of the mysql client binary so that I could interact with the remote server.
Turns out that in ArchLinux, themysql binaries are split into a clients and a server package, perfect for when you wish to interact with MySQL databases, but not have the entire frakking server installed on your machine.
Accessibility, HTML and myConf
Sadly, like all documents from w3.org, they just leave me more confused and without any questions answered than when I began, but luckily, there seems to be other resources more knowledgeable, and with more understandable wording/examples, although I haven’t had the time to read through them all yet (I’m mostly just dumping them here so that I’ll be able to find the pages again once I again have the time to look into it):
Now, I have to admit, until this week, I’d never heard of Ed, and I have rarely read stuff on Hacker News, but from what I’ve read so far of his book, I might have to change this.
Optimizing Vim usage
A fellow… hmmm, a fellow Fellow made me realize just how long it is going to take me to fully grok Vim. I have been using
- Go to the first line (“gg”)
- Enter visual mode (spanning entire lines) (“V”)
- Go to the last line (“G”)
- And finally delete the selection (the entire contents of the file) (“d”)
Or one could just do
:%d as the fellow showed me… And I have been using the pattern
:%s/foo/bar/ for quite some time, understanding perfectly that “%” in this context means “for every line do…”
I just never made the connection that it could be applied to something simpler than a sed substitution.
Lack of (American) geeks is a national security risk according to DoD. Funny, anyone else who thinkgs that if they just stop prosecuting every kid who is playing around with security systems, or dowload music, or build (more or less dangerous) stuff from schematics they found online, this problem might just go away on its own?