Spacer
Spacer

NGCODERS.COM

[ NEXT GENERATION CODERS ]

Spacer

Adding Javascript to WordPress without Plugin

Though it would seem pretty simple, but as soon as you try to add a JavaScript to your WordPress post which is more than few lines of code. WordPress somehow messes up the code and the script will not work due to wordpress formatting it. You can disable formatting but then other old posts also loose formatting. The other solution provided is to add them to template / make JS files and include them. Both require more work.

Here is my little solution , Basically pack the script and make it as a one line of code which can be added to the html editor –

Go to the following link paste your JavaScript code and embed the WordPress embed in your wordpress …

WordPress JavaScript Packer

Best Window/Split Air Conditioner, Brand , Stars , EER and more …

Buying a AC is no easy task, With so many brands to choose from and varied reviews of each if you ask the Dealers or check online.

But more than the Initial Cost the Electricity Bill(running cost) associated with the AC is what actually hurts. So recently I had to make the same decision in buying a second AC. I already own a Hitachi Window AC. Here are some points that I found out and a little JavaScript calculator which I wrote which helped make up my mind -

Try to go for Split AC , they are much quieter and more efficient though come at a higher Initial Cost. The Hitachi window I have makes me feel like sleeping next to a running vehicle !!!

The Total ownership cost difference over 5 Star rated and 3 Star Rated AC over a course of 5 years is almost same usually. But 5 star rated AC’s are about 20 % more expensive than 3 Star ones when buying the AC ( but this 20 % is paid back over 5 years in most cases). You can check using the calculator below.

More expensive does not mean itll recover its cost in Electricity Bill as some companies state. Do the calculations yourself and you will see.

Avoid the Cheapest ones out there, there is a reason they are cheap !

Most big terms like AntiBacterial filters, Night mode,Ion Purifiers etc are nothing but terms to attract you. You should just look at appropriate cooling capacity and running costs. As most of us just Switch them on and forget about them.

Here is a small calculator I wrote based on a Thread from TechEnclave which will help you check running cost of an AC and the total ownerships cost over a period, use the calculator below to decide if the AC is worth the extra money or which one is better -

Youtube Java Applet to Download Videos

Lately all major download sites have shifted to using Java applet based downloaders. This is due to the new IP locking introduced by Youtube.

So i was asked by a few clients to do the same, Here is the theory behind it if you want to build your own.

Here is the latest version with support of over 100 sites –

Java Applet Downloader Demo




Download it Here

FreeDown Updated Again !!!

Youtube has now started to have ip locking for its videos around March 18 2010. This is on the same lines as being done by some other sites like MegaVideo for Example. Now to allow user download from such sites there are two ways –

  • Your Server streams the files to users – This method uses 2x bandwidth and can make most shared hosting servers crawl. Though is more transparent. But as soon as your site becomes popular , high probability your server IP address facing a ban.
  • Use supplies supplies source code of vieweing page – Simple and effective , User has to paste source code of page he is viewing. Approach being followed by other grabbers. But unlike other sites i have also attached a bookmarklet which streamlines the whole process to one click.

Update [2010-4-19]

Fixed again 3gp , mp4 , HD support added.

Update [2010-3-31]

Both methods are supported now , use config.php to choose whatever you want.

Download New version here –

FreeDown

PS: This is not a public forum to sell your scripts , you can offer fixes but sale is not allowed.

FreeDown Updated – Youtube Downloader Script

Ive updated the FreeDown script , mainly added exception handling when something went wrong while fetching download Link.

Download New version here –

FreeDown

RapidShare Streamer ( aka Premium Link Script )

I was recently banned by rapidshare due to “Account Sharing“. It was actually due to my dynamic IP and me moving around using it from multiple places. Though they enabled my Account they warned me of further problems when using Dynamic IP are possible.

So here is a solution i made for myself it resides on one of the hosting servers so that my IP always remains one. It stream files to me from rapidshare , something like those premium link generators but simpler.

Here are the requirements –

  • PHP 5
  • CURL Enabled
  • One Rapidhsare Premium Account

After Install Please fill up username and password in config.php .

VideoSwiper Hacked … Hackers impersonating Owners

Site has been restored back to original owners

I had built VideoSwiper long time back for Jason . You can read about it here http://www.ngcoders.com/php/videoswiper-mass-video-embedding-application, you can also check it out in my portfolio site.

But i have to come to learn that the hackers taking advantage of the holidays hacked the main server and have stolen the domain also. So basically now they are running a site which is a less featured clone on videoswiper.com . They reset all the accounts by redirecting the email which was admin[AT]videoswiper.com. Also they have the balls to say that the original owner is doing phishing :) . They also have stolen downloadMod.php code from my site Videoswiperplus and saying that they have written it.

I hope jason gets his sites back soon.

You can read more about it here – http://www.jasontaylor.me.uk/2010/01/04/videoswiper-hacked-dont-be-fooled/

Hackers should be dealt swiftly , i did have a soft side for these guys when i was a kid. But now i think they should be treated like common criminals , and maybe some should be made an example out of to stop the damage they cause.
Lesson learned – Avoid having emails for hosting and other important accounts like email@yoursite.com , if yoursite.com DNS record gets hacked all emails are redirected by hackers to reset everything and you will never come to know what happened. I believe sites like gmail , yahoo are much safer in this case. Also keep diffrent password for every single account , atleast the important ones.

FreeDown Downloader , Video Downloader Script

Freedown

A lot of people asked and requested a theme for the Youtube download script on my site , So here is an upgrade to it. This is a simple script which allows you to run a small site around it. Something like a keepvid clone.

Requirements –

  • PHP 5

License –



FAQ -

  • I get “Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /membri/verdehouse/videopian.php on line 25″.
    Please upgrade to php5 , or modify it to work with php4.
  • Warning : This script uses 2x bandwidth to download videos. So to download 40 MB Video it will use 80 MB bandwidth. Also this is CPU cycle intensive.
  • Please use Java Applet Method if your site does more that 30 – 50 visitors daily

Custom Intel GMA 500 XP Drivers for Netbooks

If you have one of the Netbooks which has a Intel Graphics Media Accelerator 500 (GMA 500) then you cant play old games like Age of Empires 2, Diablo, Warcraft , Starcraft etc due to direct draw/OpenGL issues with the default driver. The Default driver is really bad and buggy.

So here is a driver which will allow you to play these games and more on your netbook. Its just that i still play AOE i had to find a solution and not disable GMA 500 to play it.

This applies to most 11.6″ notebooks being powered by GMA 500. Some examples are Acer Aspire One 751,Asus Eee PC 1101HA,Benq Joybook Lite U121 Eco,Dell Inspiron 11z, MSI Wind U115 etc etc . For a complete list visit http://www.notebookcheck.net/Intel-Graphics-Media-Accelerator-500-GMA-500.12614.0.html.

PS: GMA 500 is a really underpowered Video Chipset, With Drivers which make it even worse. Avoid it at all costs.

ARM9 , OMAP And BeagleBoard in India

Currently i am working on a ARM9 based platform and found out that in India its really hard to get by ARM9 which is above 500 Mhz and costs < Rs 10k. ARM7 TDMI is whats easily available and after having some fun with it , it was found to be highly underpowered.

So if anyone looking for a ARM9 Based Platform in India get a Beagle Board ... Its what i call Awesome :) for the price and performance. To get it you can go through either Indian vendors who overcharge and fleece as usual or Get it from Sparkfun(Awesome Service) where i got it from. Digikey also sells it but charges a hell of a lot of shipping. So if you are looking around source from US and dont waste time like i did looking locally and getting frustrated.

http://www.sparkfun.com/commerce/product_info.php?products_id=9444

149 USD + 9 USD USPS = 160 USD ( approx Rs 7500 as of the time of posting ). The cables , SD card etc all can be bought for < Rs 500 locally.

While Indian vendors like Cranes etc are charging like Rs 13000. Why dont we have shops like spark fun in India :) .

You can also buy from IDA Systems for Rs 9000 http://www.idasystems.net/beagle_board.