Tuesday, October 16, 2007


I've been trying out Django, so I was thinking, I wanted to try out the webframework for perl too, so I poked around and found Catalyst. Still in the midst of testing it.. and so far... it still seems a little unfrenly.......... but we'll see, I will update about it again.

Friday, October 05, 2007

Bulk resize with python

Recently I had to pick up python for a project. So as usual, it is easier and more fun for me to learn something if there is a purpose! So this time, since I'd been messing around with a new camera, I wanted to have something to bulk resize my pics. So I decided to write a script for it. And so here it is!
import Image, os

def make_smaller(path):
for item in os.listdir(path):
image = Image.open(item)
image.thumbnail((583,389), Image.ANTIALIAS)
print 'Resizing: '+item
except IOError: None

make_smaller('/home/widdlepuke/Desktop/Python module installers/test')

Very simple, and I must say, I do kinda like python now. I still like my perl though :p I am also currently messing with the Django framework. More on that next time.

Wednesday, September 19, 2007

Attempt to install modperl

Recently I attempted to install mod_perl on my FC5 at home. Unfortunately, it ended up with my internet connection screwing up. Ndiswrapper got messed up and I was in a funk, so I delayed a time before getting down to work on it. So I reinstalled ndiswrapper, thinking it might have been corrupted, but I ended up with my fedora giving me panic attacks!!!

It was quite a pain, and of cos seeing those panic warnings made me panic a little too! Then I tried recompiling it and so on and stuff, still failed. In the end, I took a closer look at my error messages, and realised that there was a conflict with my kernel info in grub. I didn't take down the error messages, but it was something about the kernel not being suitable for wireless settings. (I was on a wireless connection) So I checked, and to my surprise, my grub looked.. grubby. It wasn't what I had put in earlier.. and there's a blog entry here to prove it since I did record down how I setup my wireless connection in this blog. So I suppose something I did when I tried to install modperl screwed it up, and I ended up loading a different kernel from what I expected. So I just changed it back to the original and then my ndiswrapper was happy!

So it was alright then, in about 2 hours or so. I haven't got my modperl working though, kinda busy to work on it, but I'll try to do it, and will update here in time :p

Wednesday, August 29, 2007


I recently set up a subversion server for my institution. I had set one up a long time ago, but this is a different server. So had to revisit some stuff. So I guess I should document some of the stuff in case I forget them again.

So first of all, I have to create the repository. In my case, I put it in /svn/repository and I create my repository there.

# svnadmin create bankapps initenv

Settings for SUBVERSION in httpd.conf

1: <Location /svn/bankapp > -->the parameters you put in your url
2: DAV svn
3: SVNPath /svn/repository/bankapp -->the actual path to your repository
4: AuthzSVNAccessFile /svn/users/users -->the path to your user access list
5: Require valid-user
6: AuthType Basic
7: AuthName "Bank Applications Development"
8: AuthUserFile /etc/svn-auth-file -->the path to your password file
</Location >

Lines 2 and 3 are the required lines for this to work, you may omit the rest if you want to allow public access.

In the user access list, you have to create a file, and in the file, it should look something like this:


maggie = rw
user1 = rw

maggie = rw

And, for your password file, you also need to create it, using htpasswd:
# htpasswd -c passfile user

You will then be prompted to create a password. Subsequently, you may add more users:
# htpasswd -b passfile user password

Then you have to restart your apache
# ./httpd -k restart

Now, browsing to http://yourdomain.com/svn/bankapp should prompt you a password and allow you to browse the files inside.

To upload and do stuff, get the tortoisesvn, it's rather userfriendly! http://tortoisesvn.tigris.org/