Mapping a subdomain to content or folder of main domain with .Htaccess file

Posted by Damodar Bashyal on April 28, 2012

 

I wanted to create subdomains for all the categories listed here. It was not possible with shared hosting with previous web hosting provider. So, I moved to media temple and they support wildcard subdomain.

So, today I generated all the subdomains to test with all the categories here: http://learntipsandtricks.com/categories

But all of them were displaying homepage content as I had not modified the .htaccess file. So I added this:

More»

Magento Add Admin User through programming code

Posted by Damodar Bashyal on April 25, 2012

 

We got a new magento project which was developed by another web development company and it wasn't finished. Client didn't have admin details but he had FTP details. He didn't know about control panel url, so couldn't access phpMyadmin. Instead of going back and forth with client about details, I wrote this code, so I could create admin user myself and access the admin.

I think it will be a good idea to create new admin user for every single admin user including developers, so if one developer quits we can just delete the user and don't need to worry about changing passwords again and again.

More»

Javascript function to check and uncheck all checkboxes.

Posted by Damodar Bashyal on April 21, 2012

 

Today I was filling one online form with 100 plus checkboxes, after checking 4-5 boxes, felt bored. So, wrote a simple javascript function and ran it through firefox's firebug console and checked all boxes with just one click on run.

I had a simple one with no if conditions, but decided to make it better so i could use it on my websites. So here you go, a very simple JS check and uncheck all checkboxes functions. Just one function handles both options.

More»