Death of a Nobel Laureate

Friday
Jun 18, 2010

News post image

A nobel prize-winning author who wrote one of the most profoundly moving books I've ever read, died today. His name was [José Saramago], and the book was [The Year of the Death of Ricardo Reis].


Setting up Python / Django / MySQL / mod-wsgi on a QNAP NAS device

Tuesday
Jun 15, 2010

I was able to set up an Apache webserver utilizing Django, Python, MySQL, and mod_wsgi on a QNAP TS-809 PRO and a QNAP TS-859 PRO recently. It was a little bit of a pain so I thought I'd document some notes here in case anyone (myself included) needs to repeat the process. These instructions might get dated soon due to changing software modules / expiring hardware. Such is current-day technology, the flux is too great!

1. Enable the following on your QNAP: a) Web server, b) SSH, c) MySQL server with TC/PIP

2. Download and install the following qpkgs from QNAP: a) phpMyAdmin, b) Python, and c) Optware. FYI, the current QNAP Python qpkg installs version 2.5.2. My QNAP TS-809 PRO lay behind a corporate firewall and I had to install Optware manually (instructions on the QNAP wiki, use the ts-509 .ipk file with the TS-809 PRO) after utilizing a proxy server with python's ntlmaps module... this was a royal pain.

3. SSH to the QNAP; using ipkg, install the following: a) mod-wsgi, b) nano (this will make editing easier), and c) gcc (this might be optional). Note that installation of mod-wsgi will trigger download and installation of other python and apache instances; you can simply remove these redundant and unnecessary modules, ignoring the dependency warnings.

4. Download and install the following python modules into the site-packages directory of the qpkg python install: a) setuptools (linux egg), b) MySQLdb, and c) django. Remove any other "site-package" directories that possibly crop up due to the installation (you can find them by typing: "find / -name site-packages" at the linux prompt. Verify their installation by typing at the python prompt:

>>> import django
>>> import MySQLdb

5. Append the following lines to apache.conf:

LoadModule wsgi_module /path/to/mod_wsgi.so
Include /share/Web/Sites/apache/*.conf

Replace "/path/to" with the actual path. The latter line points to individual django website configuration files that you can custom create later. Note that "/share/Web/" for the TS-859 PRO is "/share/Qweb/" in the TS-809 PRO.

6. Create a file called phpinfo.php in "/share/Web/" that contains the only line: "<? phpinfo() ?>". Restart apache, navigate to this webpage, and verify that the mod-wsgi module has loaded. Delete this file later for security reasons.

I'll finish this later.


Technical notes

Monday
Mar 01, 2010

I solved an annoying technical problem tonight. I run Mac OSX 10.6.2, and I have a Thecus N5200pro NAS device. I had several shares on it and I wanted the ability to specify access permissions to the various shares. The Thecus interface allowed me to specify an access control list, which seemed promising initially. Whenever I restricted access to certain users, FTP and Windows access control worked fine... however, I was unable to access files on the share below the root directory via my Mac. Intriguingly, I was able to create and have full access to any new file or folder, but I had no access to existing ones.

So I suspected some sort of unix file permission error in propagating permissions past the root directory. I posted a message on the Thecus support page, and got no replies. I did some internet searching, and finally found a workaround today. First, I had to get SSH access to the Thecus to be able to set file permissions, so I had downloaded SSH modules and installed them on the NAS. After installation, I ssh'ed via Terminal to the NAS, navigated to the appropriate directories, and typed the following:

>>chown -R <owner_id:group_id> directory

This recursively set permissions on the specified directory and all its subfolders, to the owner and group specified. Now, I have directory-restricted, user-level LAN access to my NAS via Windows and Mac, as well as directory-restricted, user-level FTP access. That's nice for having a large online disk, although you have to know the dynamic IP address and the upload connection to it is slow. But whatever, it now works and I'm pretty pleased about it.


Cutting links

Tuesday
Feb 02, 2010

Actually, I think the last post is loosely related to the topics below. Maybe it's just my personality type, or maybe it was just coincident with adulthood, but the concept of the internet and with easy communication is tied up with loneliness in my mind. That is, after attending college and embracing technology, there has been a progressive deterioration in my social network, despite the proliferation of technological means to communicate (e.g., cell phones, email, voip, IRC, iChat, Skype, social networking sites, twitter, texting). I can't rule out the possibility that this might be coincidence, and deterioration in social networks occurs naturally with adulthood regardless of time and culture.

But for me, overexposure to something cheapens the experience. I have no less than 9 computers that I feel responsible for maintaining... what started out as a hobby has turned into work. I had numerous bootlegged PS2 games that I never played. I have seen too many movies and am bored by the same old Hollywood formula. This wouldn't be so bad if it didn't affect the rare games, movies, and technologies that are worth experiencing!

Maybe I am seeing this phenomenon in the social domain. The overwhelming pool of friends on Facebook makes me less inclined to talk to any of them. It's not all bad, I can imagine that this type of desensitization might be therapeutic, e.g., for getting over an old girlfriend or something along those lines. But the plethora of weak connections leaves me paralyzed, in a sense. I was built to establish few quality ties, interacting with people substantively... and these proxies are a really lame substitute, perhaps better fit for the social butterfly, or the utterly alone.

So what does this have to do with my previous post, about Reddit and Digg? Well, it doesn't, at least directly. It's more abstract. It has to do with disconnecting from a technological addiction that gives me only short-term gratification, but appears to have negative long-term ramifications. The experiment would be to disconnect further from the internet and other frivolous activities. I know, I run my own blog, program my own webpages, among other "techie" things... I see the irony. But I believe I do those things more for the challenge rather than the result, more for the method than for the content.

Over time it might be worth trying to restrict my internet usage, delete my Facebook account for the second and last time (I never use it anyway), and concentrate on the good stuff. Why don't I delete the account now? I would feel as if I owed people an explanation, and that's more trouble than it's worth! What is "the good stuff"? I almost have to re-learn what it is, but if it involves other people, I get the feeling it's less available as everyone is pretty much glued to their internet-enabled, text-capable phones.


Web Filtering . Bye-bye Reddit

Sunday
Jan 31, 2010

Since 2008 or so, I've developed a fondness for user-voted newsfeeds. It started with [Digg], then [Reddit] as Digg started pushing time-wasting, "human interest" stories to the front page. To be fair, the same thing has been happening to Reddit, though various sub-Reddits still are able to maintain some quality.

There's something about endeavors not being worth it unless it's all-consuming. For me, surfing Reddit fell into that category, to the point that my productivity is at an all-time low, and I can't afford that nowadays when my time is divided so much between job and family. So I started investigating my options about website filtering.

Web filtering is an option on most routers, but not mine (currently Trendnet TEW-633GR). Annoyingly it had the ability to allow access to specified websites and block all others, but not the reverse... block specified websites and allow all others. I find it hard to imagine how this one feature can be implemented but not its converse.

Anyway, the option that I eventually landed on was web filtering via [OpenDNS]. This solves an additional issue that I was going to have to eventually handle... that is, filtering inappropriate websites for the family. Anyway, the procedure involves getting an account at OpenDNS, specifying your IP address (and installing optional software to track your IP if it is dynamic), and selecting categories of websites to block, as well as a blacklist of custom sites. Then you have to set the DNS servers on your router to point to OpenDNS's dns servers, then voila! Web filtering accomplished. It wasn't so easy, as there were no instructions anywhere for getting my router to use the opendns servers, I had to play around with it until I got it.

Anyway, Reddit and Digg are not currently accessible at home; hopefully I can use this newfound time to retrain my habits and increase my productivity. Though, I must resist the temptation to log in to OpenDNS and remove the blacklists...


ARCHIVES

2026
2010
2009
2004
2003
2002
2001
2000
1999