Posting PHP codes on blog.

If you want to post PHP code on blog or any web page then its easy. Use the command:-

php -s /path/to/your/php/script > The_Code_to_post

This will generate a html code that you can directly paste in the web page’s code to display your code with syntax highlighting, but if you post this code in Blogger.com or Drupal then you will notice extraneous blank lines after every line of your code. This is due the fact that Blogger.com and Drupal insert a line break themselves whenever they encounter a new-line or carriage-return. To fix this problem, use the following command instead of the above one.

php -s /path/to/your/php/script | tr -d ‘\n\r’ > The_Code_to_post

Dataone – BSNL Broadband: Common problems and quick fixes.

I am a BSNL Dataone user and as any BSNL user knows that in case of problem u can turn towards BSNL for help. So, I guess I should help fellow users to let know the solutions to common problems I faced or face.

problem When trying to dial and connect to BSNL you get Error 678 – Remote computer is not responding.
sol Make sure that the link light of your modem (actually router) is ON (green). If not then wait for about 2 mins. If still not contact ur BSNL local exchange.

If the link light is lit happily then make sure the router is connected to ur computer. Now turn OFF the router. And now turn it ON. Wait for link light to turn ON. Now try. It should connect now.

problem I get Invalid Username or Password and I am pretty sure that they r correct.
sol Nothing. It happened to me sometimes. Just keep redialing.

problem The check usage site doesn’t open.
sol Then goto alternative portals of the same site. Try any one of the followings.
http://10.240.43.216/
http://10.240.89.199/
http://10.240.16.195/
http://10.240.0.195/

problem Connection gets lost after a power cut though u r using an UPS.
sol My router (Huawei MT882) has this problem. The reason I guess is that it is extremely sensitive to slight distruption of power which happens when online UPSs switch to battery mode from AC mode. So, getting an offline UPS may help.

Importing iTunes playlist ino Winamp, Windows Media Player or any other player.

I don’t like iTunes much, but I still use it, to syncronise my iPod Shuffle. I have hand-picked the songs on my harddrive and created a playlist in iTunes, which I sync with my iPod. The problem is, due to iTunes’ inability to save its playlist in anything but a cryptic XML or text format, it cannot be imported into any other player. I have now chanced upon a simple method to do that.

Open your intended target player (e.g. Winamp). Select all the songs in iTunes that you want to add to target player’s playlist (press Ctrl+A after clicking on any song entry in iTunes, to select all the songs). Now left click on any of the selected song in iTune and drag (while keeping your mouse button still pressed) to the playlist of the target player. Now all these songs have been added there!

Making folders invisible in Windows – The easy way.

My friend Kaustubh suggested an ingenious way hiding your folders in Windows. The method is easy to follow for any user. I have modified it a bit to make the folder completely disappear. It will be right in front of you but u will not be able to located it, unless you have been told that there is a folder there. See below for example.

Locate the folder in the screenshot below.

Did u find it? See below.


Now did u find it? U can open the folder like any ordinary folder, i.e. by double-clicking it.

The method:-
1) First rename the folder. (Right-click on the folder and choose ‘rename’ or select the folder and just press F2 on ur keyboard.) You must rename the folder to blank but Windows doesn’t allow you to name your files or folders just blank. Hence u need to name ur folder with a character which appears to be blank but it is not a blank. Confused? Well just follow me.
a) Select the folder and press F2 on your keyboard.
b) Make sure NumLock of your keyboard is on. (You do this by making sure that the LED corresponding to your NumLock is glowing).
c) Now press Alt on your keyboard and while keeping it pressed, type 255 on your NumPad. NOTE: You must use the number keys on your NumPad to type in 255 not the number keys on the top row of the alphabet keys.
d) Now press Enter key on your keyboard.

2) Now after making the file name to disappear, it is time to make the icon disappear.
a) Right click on that folder and then left click on Properties.
b) Now left click on Customize.
c) Left click on Change Icon button.
d) A new dialog will pop-up. Scroll the icons list and choose the blank icon. (There are 4 blank icons.) Refer the picture below.


e) Now click on OK. Click on OK in the following dialog too.

Now u have an invisible folder! Enjoy!

Create Dynamic Flash Messages.

Few days back I stumbled upon a site Aninote.com. This cool site lets u create flash files which can deliver specific messages beautifully and powerfully. All this with minimum use of grey cells. Take for example the flash file beign played below. If your name is ABC XYZ the type in your address box – abc.xyz.YouAreMighty.com. This will display you name in the flas file instead of mine. There many more such ‘dynamic‘ flash files on this site. Check them out!!!

How to save videos from Google Video.

In the last post I posted a video from Google Video. If u wanted to save that file to hard disk then u might have found that there is no way to save them. Well, u can save them!

First, download Google Video Player from here. Then click on Goto Google Video in the button of the player below. U will be taken to Google Video site. There click on Download (choose ur operating system alongside). This will start the download of a file with extension gvp. This is of few kilobytes. Run it from the downloaded location by double clicking it. This will launch Google Video Player. Let Google Video Player download the full video. U will know the percentage downloaded by the percent of the seek bar which got grayed out. When complete, goto to Google Videos folder which is inside My Videos folder (which is itself inside My Documents). There u will find a file with the same name as that of the gvp file u just downloaded, but its extension will be different. It will be gvi. This is ur file. It is a simple DivX avi file. Change the extension of this file to avi and play it in any media player.

Enjoy!