Posts Tagged ‘ nginx

Pastebin and Mercurial

I decided to start adding additional functionality to this site. As much as I feel like I’ll benefit from having a place to focus my mental energy, having the tools to assist in that focus would be a huge plus. The first two things I thought of were a personal pastebin, and a revision control system.

Pastebin was fairly easy to get going. Since I’m using Nginx, the only pain was setting up the scripts for FCGI (as noted in my previous post). After that it was quite simple. The one problem I had was the SQL provided for pastebin didn’t work. It bombed on one of the KEYS. I didn’t feel like worrying about it, so I configured it to use files instead. Just as easy.

For a revision control system, I decided to try Mercurial. I’ve heard good things about it, and I know a few people who are running it as well. I also wanted to get a web frontend working. Nothing fancy, just enough to see what’s going on. My main goal for this was to put my rc files in an rcs of some sort so I can continue to modify them and review changes. I’ve been modifying them a lot lately, and found that bouncing back and forth between changes resulted in a lot of commented lines. It’ll also be nice to pull my rc files onto whatever machine I’m on, or if I can’t install hg, I can always just get them off the website. This was a little tougher to install. Most people suggest using Nginx as a proxy and use Apache as the backend server. I wound up going that route after many attempts as getting FCGI in Nginx playing nicely with Mercurial. But hey, now I have a place to house my rc files. Well worth the effort.

Late Night Productivity

For the fifth day in a row I find myself awake at almost 1am, and there’s no sign of being tired in sight. But being a geek has its advantages when this happens. While most people would complain about being awake, try to read a book to coax their body to sleep, or just toss-and-turn in bed, I get to enjoy hacking on stuff. It’s amazing how much more productive I get as the night goes on. This is the sort of schedule I was on in college. I’d spend my days cranking through classes and work, rip through homework as quickly as possible, and then spend the rest of the night learning stuff.

With my late night tonight, I setup this domain, purchased a VPS from Linode, and built the site. I think the biggest pain was configuring nginx with php-fastcgi support. On that note, I find it horribly frustrating that nginx, one of the most lightweight and speedy web servers, causes so much pain to get PHP working. I hardly think that installing spawn-fcgi, and writing a bunch of custom executables and init scripts is an adequate way to go about doing it. But hey, at least it works.

I guess I’ll get back to working on the site. If I can’t get tired soon, I might as well take a shower and go back to work…