Browsing articles tagged with "script Archives - Kalpesh Mehta"
Aug 22, 2014
kalpesh

Magento get CMS page content without header/footer

Magento get CMS page content anywhere on the site without header and footer using below script. You may need to do this for displaying CMS page on part of the page, like popup or sidebar of the page without using header and footer of the CMS page that generally comes when loading the page from the CMS URL.

1
2
3
4
5
6
$page = Mage::getModel('cms/page');
$page->setStoreId(Mage::app()->getStore()->getId());
$page->load('CMS-IDENTIFIER-HERE','identifier'); //EDIT IN THIS LINE
$helper = Mage::helper('cms');
$processor = $helper->getPageTemplateProcessor();
echo $html = $processor->filter($page->getContent());
Nov 2, 2012
kalpesh

Linux: Bash script to check availability of domain names in differnet TLDs

If you want to check whether your desired domain name is available or not in different extensions, it’s tiresome to search it for each and every tld. There are also limits of performing query to whois on websites, where they will not allow you unlimited whois information queries. It’s better to have your own script which will tell you the availibility of domain name in different extensions, right from your terminal.

Below script will check your domain name for TLDs .com, .net, .org, .info, .us, .co, .tel, .tv, .biz, .cc, .ru, .eu, .in, .it, .sk, .com.au, .sh, .re and .dk
But you can add other TLDs also if you want.

First create a file, e.g. chkWhois.sh, and give it proper permission to execute.

1
2
touch chkWhois.sh
chmod 744 chkWhois.sh

Now, copy below code to this newly created file
Continue reading »

Nov 2, 2012
kalpesh

Linux: Bash script to get email address and created/updated/expires dates of domain name

In linux, to check the whois of any domain name, the simple command is:

1
whois domainname.com

But, it will show you so many things which are not important, e.g. it will show you the NOTICE and TERMS of USE and so many other things.

If you are only concerned of getting the email address and creation/updation/expiry date of domain name from whois, here is the bash script that will help you out.
First create a bash script file, e.g. whoisEmailAndDates.sh and give it permissions to run:

1
2
touch whoisEmailAndDates.sh
chmod 744 whoisEmailAndDates.sh

Continue reading »

Welcome to my Blog

Kalpesh MehtaHelping Magento developers in their day-to-day development problems since 2011. Most of the problems and solutions here are my own experiences while working on different projects. Enjoy the blog and don't forget to throw comments and likes/+1's/tweets on posts you like. Thanks for visiting!

Certifications