Watching A Geek Show
Posted by Quinn at August 24th, 2007 2:40pm under web 0 Comments Permalink
I just enjoyed watching Digital underground.tv episode 4. The good is they don't talk too geeky or smart-assy. If you think you don't know what to do with your geek life or looking for more fun with it, this show might bring you some insights, maybe?
Sound of Higurashi
Posted by Quinn at August 5th, 2007 9:44am under Japan 6 Comments Permalink
The most humid and hottest month of year is August in Japan (or is it so in most places in the northern hemisphere?) Anyway, Since I moved to here, a small village in the mountain side of Japan. I've been enjoying hearing the sound of Higurashi cicada at the evenings of hot summer days. Their sounds are nicer than other kinds of cicadas, which are loud in hot day time.
I wanted to give a hint of what I am talking about to those who think Japan is still in the mystery part, so I am posting the sound here. (finally!)
Excuse me if the quality of the sound is not good for you. This was my first try recording the sound. I would suggest not to set your volume to high though. I hope you enjoy!
Updated: I added Odeo player for this audio file, so you can play the sound easier.
PHP5 on CentOS
Posted by Quinn at July 10th, 2007 12:40pm under web 1 Comment Permalink
I had some fun playing with CentOS4. I am kind of new to rpm and yum, so I thought I should make some notes.
It is time to go PHP5. I am so happy to see the movement. Unfortunately, I had a box of CentOS4 came with PHP4 installed. Yes, I was obsessed to make a change to the box.
I had to install yum first. I had to get some dependencies as well, so here is what I did.
#wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm #wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm #wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm #wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm #wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/yum-2.4.3-3.el4.centos.noarch.rpm # rpm -ivh sqlite-3.3.6-2.i386.rpm # rpm -ivh python-sqlite-1.1.7-1.2.1.i386.rpm # rpm -ivh python-elementtree-1.2.6-5.el4.centos.i386.rpm # rpm -ivh python-urlgrabber-2.9.8-2.noarch.rpm # rpm -ivh yum-2.4.3-3.el4.centos.noarch.rpm
Now yum is ready. But, when I went..
# yum update --enablerepo=centosplus php
I got errors of dependency conflicts. Then, I found this, which explains the issue of upgrading to PHP5 with yum.
Here was the solution.
# vi /etc/yum.repos.d/CentOS-Base.repo [base] exclude=php* kernel* postfix* [update] exclude=php* kernel* postfix* [centosplus] exclude=php-xml php-domxml
I am not sure if this one above actually helped. But removing php-domxml like below was a MUST. Then, it came through.
# rpm -e --nodeps php-domxml # yum update --enablerepo=centosplus mysql php
This upgraded all MySQL and PostgreSQL as well. If the server was hosting real websites, I should to be more careful though. Anyway, I then added some of those and I'm happy now.
http://centos.arcticnetwork.ca/4/centosplus/i386/RPMS/php-xml-5.1.6-3.el4s1.7.i386.rpm http://centos.arcticnetwork.ca/4/centosplus/i386/RPMS/php-xmlrpc-5.1.6-3.el4s1.7.i386.rpm
Apache and RoR
Posted by Quinn at July 9th, 2007 12:47am under web 0 Comments Permalink
This is about how to set up web server to run RoR with Apache in front.
I am hosting several domains with Apache and its VirtualHost directories. I was wondering if I could run Rails with the same server and the same port. Yes, I knew the anwer was mod_proxy but never tried before. Well, that had to change. Here is what I came up this time. It was pretty easy and nice.
There is no mod_proxy package/port for FreeBSD. I had to recompile Apache2.0 with this configuration.
echo "WITH_PROXY_MODULES=yes" >> /etc/make.conf
Then, I did.
portupgrade -f apache2
Easy way, huh? But if you don't have portupgrade, you may have to do..
# cd /usr/ports/www/apache20 # make deinstall # make install clean
Then, I added these lines in the apache config file.
# vi /usr/local/etc/apache2/httpd.conf
LoadModule proxy_module libexec/apache2/mod_proxy.so LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so
Make a new Rails app.
$ mkdir -p /path/to/application $ rails /path/to/application $ cd /path/to/application $ mongrel_rails start -d
Lastly, mod_rewrite does the rest with [p] flag.
$ cd /path/to/application $ vi .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://localhost:3000/$1 [P]
Now, I can access to the Rails application without specifying the port number but a url to the directory just like the others. In this way, I don't have to reconfigure the router to open the ports every time I start new RoR. Cool. Isn't it?











