Wednesday, September 15, 2010

Javascript and CSS Presentation

I have prepared a presentation which covers javascript basics, functions, classes, closures, AJAX, Minification, CDN, CSS selectors, JSONP and best practices.

Below is the link

https://dl.dropbox.com/u/4970006/blog/static/presentations/webapps.html

Demos are also part of the presentation.
When you run the demos, a div will popup, click on the same div to hide it.

Use up and down arrows with browser maximized.

Friday, September 10, 2010

Remove ^M (Ctrl-M) character from the end of file

Sometimes you see ^M character at the end of the file, when you copy the file from windows.
Use below command in vi editor to remove them


:%s/^V^M//g


In UNIX, you can escape a control character by preceeding it with a CONTROL-V.

So what use see when you type the above commad, will be

:%s/^M//g


References: http://www.tech-recipes.com/rx/150/remove-m-characters-at-end-of-lines-in-vi/