Tidbits @ Kassemi

A collection of opinions, thoughts, tricks and misc. information.

Thursday, March 30, 2006

 

Zippo - A new handler for mod_python

Hello everyone,

I've just started (and, surprisingly, am almost done) with a new project of mine. You've all probably worked with turbogears and cherrypy, and you're aware of how wonderful they can make life for python web developers. I've been using cherrypy for a while now with a framework of my own very similar to turbogears. In fact, the std matching site that I developed runs on it. I called it zippo.

It got very complicated, as would be expected, and I decided recently I'd take a look into the code and start cleaning it up a bit further. That got me thinking of other development techniques, such as mod_python. I prefer mod_python over cherrypy, as it hooks directly into apache instead of needing to be run through its own server. It makes life a little easier to find hosting (although the folks at python-hosting.com do a good job). So I started to wonder if I could port the zippo cp stuff to mod_python. Sure enough, I found the way to do it, and created my own nifty handler. It's not nearly as full-featured as cherrypy, but it does the job well...

So far I've got the following functional:



I've still got a lot of work to do on refining it until it's ready for production, but I think I'm going to GPL it so all you people who never read my blog can use it, too. For a simple "Hello World" page I'm getting about 560 requests per second with ab (1.7 GHz Pentium4), and with a more complicated page involving user authentication and uncompiled cheetah templates, about 230 rps.. Not all that bad. Give me a few more days and I'll put out the first release.

-James

Thursday, March 23, 2006

 

A new monitor!

Hello everyone.

I'm happy. I finally decided to make an investment I should have made quite a while ago... A new monitor. I've been using the monitor on my laptop for a long time now. It's a 15 inch, but I use an additional keyboard, and my desk is small, so it was hard to get everything comfortable. When you spend 90% of your waking day in front of a computer, you better get everything nice and comfy.

My roommate had switched out my desk chair a while back with a very nice office chair, which kept my rear soft and smooth, but my eyes were taking a beating... I'd like to show you now what this means with a screenshot at 1280x1024:



Ha! Three strategically placed aterms and gvim open, in a way I can actually work with them! And look at how many lines of code I can get now! HAHAHA! I don't know if I'll ever be able to go back!

Anyway, take it easy,
James

Saturday, March 18, 2006

 

Google Wins Hearts and Minds of Geeky User Base! (And case in court)

If you haven't already heard from slashdot or the google blog (linked above), Google has won (to an extent) it's case in court. The government will not be getting all of the information it requested. In fact, it will be getting MUCH less. So go ahead and read the blog, and be happy that the best search engine today is still fighting for us.

By the way, in case anybody wants to start a war here, I do understand that fighting the government on this issue was in the best interest of the google share-holders, but I also realize that the interests of google's share-holders is in line with the interests of the general public in this case. I've read the debates on slashdot, so if you're looking for a fight, I'm ready to fight :)

Take it easy everyone,
James

Sunday, March 12, 2006

 

Hahahaha....

I have to post this... It's one of those little stupidities that don't really cause any harm, but really kind of mess up your day....

I have a box running an svn server. I'm about to open that box up to the internet so that I can check out a copy and update my copy of a web application I'm working on via ssh on my host's server. I know the IP address, and I only want to allow connections from that server (I request a password, as well, but I'm kind of paranoid, and feel that the more levels of protection the better). So I ssh into the box from another box on my local network... I figure I'll quickly update iptables to block all requests that aren't from either my local network or the host's server. Since I have a default of accept on (It's behind firewall already, no traffic other than LAN hits it) iptables input...

$ iptables -P INPUT DROP

Ha! The bash prompt comes up... And every key I press doesn't get sent via ssh...

That's probably one of the funniest things I've done yet (my rm -rf /usr/ slip was just sad). So, I have to restart my box, and hit my pride. I've not had to reboot that box EVER (other than for first installing slackware on it), but since I don't have a monitor or keyboard for it at the moment, I'm going to have to... ARGH!

Take it easy,
James

Archives

August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006  

This page is powered by Blogger. Isn't yours?