Orchestration of thoughts

Orchestration of thoughts

Maheshwaran Subramaniya  //  A computer science engineer and mac geek, who pour thoughts on technology, computer science, mathematics and other thoughtful stuffs.

I'm blogging at My Mind Leaks ( http://mymindleaks.com )

Jun 27 / 3:45pm

Turn on line number in the vi editor using “set number” command

Turn on line number in the vi editor using “set number” command

>vi somefile.txt

Type the following in the editor

: set number

Comments (0)

Jun 13 / 11:57am

httpd.conf file in MacOS

Are you are not sure where you will find the apache’s “httpd.conf” file in mac OS?

You will find at /etc/apache2

> vi /etc/apache2/httpd.conf

Comments (0)

Jun 12 / 11:29am

Best Practices for Speeding Up Your Web Site - From Y! Developers

Good post about enhancing the performance of your website. To sum up, here are the 25 things you should concentrate.

1. Minimize HTTP request
2. Use a CDN - Content Delivery Network
3. Add an Expieres / Cache-Control header
4. Compress the Contents
5. Stylesheets on top
6. Use scripts at the bottom ( Seriously solves many issues )
7. No CSS Expressions
8. No Inline Javascript / CSS
9. Reduce DNS Lookups
10. Avoid Redirects
11. Remove Duplicate Scripts
12. Configure ETags
13. Make Ajax Cacheable
14. Flush the Buffer Early
15. Use GET requests for Ajax
16. Pre/Post load components
17. Make DOM Light weight
18. Minimize IFrame or No IFrames
19. No 404s ( yes, make 404 user friendly )
20. Reduce Cookie Size
21. Smart Event Handler ( needs real smart programmers )
22. No @import statements
23. No filters for images
24. Try to cache most of the resources ( favicon, css, js )
25. Anything should be < 25k ( better is one page download is < 25K)

Warning: The blog post you are going to read is really big.

Comments (0)

Jun 12 / 10:33am

Fix for Textmate - Command + Arrow Keys not working

Like many, I’m one of the loyal user of the TextMate application. I was fine withTextMate for all the days, until few weeks. The  Command + Arrow keys ( ⌘↑/⌘↓/⇧⌘↑/⇧⌘↓ ) didn’t work properly. I was not sure what was the sudden break in the application. Problem seems to be strange and thought that it’s only with my system. Then went tweaking some thing in TextMate , reinstalling TextMate : nothing worked. So, at-last planned to give up TextMate but wanted to do a last try.  When I did a google again, came across the same defect logged in the macromates ( developers of textmate ) site and realized that my recent snow leopard upgrade have made the TextMate numb. And fortunately, they had a fix too. Good it worked.

Fix:

1. Download the zip (Snow Leopard Compatibility.zip) from the above link
2. Unzip and run the bundle.
3. You are done. The effect is immediate.

Comments (0)

Jun 1 / 7:38pm

The Official Tim Burton Website

If you like Tim Burton movie, you would love this too. Crazy thoughts and creativity lives here.

Comments (0)

May 29 / 10:11am

Configuring iChat for Facebook

This link gave me a good guide compared to others.
i was wondering what to enter in the “Screen name” and this guide helped me to figure out.

http://www.9to5mac.com/facebook-jabber-ichat-9954903

Comments (0)

May 20 / 7:37pm

Quick Tip: How to create symbolic link in mac

Sharing you a quick tip to create symbolic link in any Unix based machines.

> ln -s [ folder / file to link ] [short cut name]

Eg:

> ln -s /usr/local/mysql-5.1.30-osx10.5-x86 ./mysql

will create the link in your existing folder

> mysql -> /usr/local/mysql-5.1.30-osx10.5-x86

Comments (0)

Apr 4 / 11:02pm

php mail() alternate to send mail in Webfaction

Webfaction doesnt support PHP mail(), for users who need to use mail functionality in their PHP application, they can try the SMTP way of mailing. To do this follow these steps

1. Get the PEAR Mail package

If your web provider supports SSH, you can try these commands

$ gzip -d <filename>
$ tar -xf <filename>.tar

2. Place the Mail.php file in a appropriate location in the server

3. Edit your mailing php script and place the below code.

$smtp = Mail::factory('smtp',
array ( 'host' => 'smtp.webfaction.com',
'auth' => true,
'username' => 'your_smtp_username',
'password' => 'your_smtp_password' 
)
);

4. Create headers to specify the format of the mail

$headers = array (
'Mime-Version' => '1.0',
'Content-Type' => 'text/html; charset="ISO-8859-1"',
'Content-Transfer-Encoding' => '7bit',
'From' => $from_name . "<" . $from_email . ">",
'To' => $to_email,
'Subject' => $subject
);

$mail = $smtp->send( $to_email, $headers, $html_content);

if ( $mail ) {
//success
 } else {
//failure
}

Comments (0)

Mar 30 / 2:43pm

Use Google Docs as Blog Editor

If you are tired of searching, downloading and testing lots of blog editor for Win or Mac / Linux, stop all those craps now. Try Google docs editor to create a post and publish to your blog account. Google docs by default supports Wordpress, Blogger, MoveableType blogs and the API based blogs.

Once you are done writing your content, Click on "Share" ( on top right hand ) -> "Publish as web page". You see the page ( Fig 1)

Fig 1. Publish this document

Fig 2. Configure your blog

Fig 3. Test the connection

Once you test the connection, click OK and then Publish your content. Done. You will see the content published into the blog. But the disadvantages are , you will not be able to attach a category and the tags to your post.

Comments (0)

Mar 2 / 9:07pm

Sherlock Holmes - Too 'Anti'que Technical

Watched Sherlock Holmes last week. It was quite good to watch, you wont understand if you watch it once. The story is good enough, but they could have took a different detective story to deal with the movie. Trying to demystify a bogus black magic guy and the threat he declares on England, doesn't seems to fit the Sherlock Holmes and his detective brain. All the black magic stuffs would be, if it is a Sci-Fi, but not a detective type of story.

I would rate a 6/10.

Comments (0)