Categories
Uncategorized

Setting Up Email Server on your PC

If you setup an email server on your PC, you can easily send unlimited emails with a custom “From” address 🙂 This is particularly helpful if you want to send emails programmatically for some reasons (I like to send unimportant emails and small attachments via Python).

To setup a mail server on Ubuntu, just install the “postfix” package:

Now you can send emails with php, python or even by typing codes on the terminal.

It was simple. Wasn’t it?

Categories
Personal Work

My First WordPress Theme: maSnun.com gets a new look!

It’s been a really long time I have been with WordPress 🙂 I installed wordpress first on a separate sub-domain and liked the power and flexibility of WP. Later I moved the installation directly to https://masnun.com . During this period, I have switched from one theme to another. What I have looked for is simplicity and lots of customization. Obviously none of the themes could satisfy me. I have used some really great themes and appreciated their beauty in this post but all these were overkill for me. I am a simple guy and want everything to be as simple and plain as myself.

I have always wanted to do something with WordPress API by adding Google Analytics to WordPress but couldn’t really concentrate out of laziness. After my first WP plugin became a hit one, I decided to dig deeper into the WP API and then Hasin Vai asked me to study on WP Theme Development. I was looking for this. He sent me the book “WordPress 2.8 Theme Design” by Tessa Blakeley Silver. The book was good theoretically but like always, I didn’t like the idea of reading all those texts. I just skimmed through. But it gave me basics and the confidence to do something with WP Theme Development.

Today afternoon, I started building my first WordPress theme and here it is 🙂 I have built it, maSnun.com gets a new look of it’s own! 🙂 This is of course a hacked version of the famous “default” theme — Kubrick 🙂

The theme I have written has no images – plain HTML and CSS. I have willingly removed the sidebar and ability to add widgets. Instead, I have some plans to put in some static contents to fill up that space. This is just a rough version. I am not very good at CSS and styling. I am basically a developer. So my design was simply rubbish! But the positive side is I have learnt the curves of WP theme development, at least the php portion.

The efforts contributed a lot to my HTML and CSS knowledge as well. It was really a cool experience working it out!

I just love WordPress! 😀

Download: http://masnun.googlecode.com/files/masnun.com-2009-the-wp-theme.zip

Categories
PHP

Google’s Text to Speech API : A PHP Wrapper Class

It’s really amazing how Google is providing cool APIs for every this and that! And here comes another one that impressed me 😀 I am talking about the Text To Speech API by Google. It’s fantastic! I wrote a php wrapper class that would help you create mp3 files from texts 🙂 Of course, using Google as the medium!

Here’s the source code:

And here’s demo :

You can alternatively pass the text to the constructor of the object like this:

That is simple, isn’t that? Hope you like it!