cPanel/Linux: How to Suspend / Unsuspend an Account via SSH

If you want to suspend/unsuspend an account via SSH instead of doing it through WHM web interface. following commands may be helpful for you.

Suspend an Account from SSH

Continue Reading »

Tags: , , , , , , , , , , ,

Linux: Cannot Delete Files from a Directory /bin/rm: Argument list too long

If you’re trying to delete files from a directory that have too many files and over sized then simply rm command will not work and you will get error /bin/rm: Argument list too long
Continue Reading »

Tags: , , , , , , , , , , , ,

FFMPEG-PHP: make: *** [ffmpeg_frame.lo] Error 1

While compiling ffmpeg-php from source with make command you may get the following error terminating your making process;

make: *** [ffmpeg_frame.lo] Error 1

Continue Reading »

Tags: , , , , , , , , , ,

WordPress: How to Add a Sticky Widget on Sidebar

I needed to add a fixed position widget on the side bar so that it stays at it’s position no matter page scroll or not, I have searched around to find a plugin to do that but cannot find any good solution, i have achieved that by playing a bit with CSS and Jquery, so here is how to do it,

If you need to add a fixed position (Sticky) widget on the WordPress sidebar, You may follow the steps below.
Continue Reading »

Tags: , , , , , , , , , , , , , , , ,

Jquery: How to Check If a Checkbox is Checked

If you want to validate if a checkbox is checked using jquery (javascript framework), here is the code snippet for the purpose.

We’ll use :checked selector for the purpose.
Continue Reading »

Tags: , , , , , , , ,

How To Uncompress Multiple .zip, .gz or .bz2 Files on Linux (Centos)

In situations while using SSH you may want to unzip/uncompress/extract multiple compressed files, you may follow the followings;

To unzip multiple zipped .zip files;

for file in *.zip; do unzip "${file}"; done

Continue Reading »

Tags: , , , , , , , , , , , , , , , , , , , ,

Javascript/Jquery: Email Address Validation Using Regexp

Email address is mostly the essential form field and to make sure that user entered a valid email address you may need to validate user input before processing. To validate an email address using javascript/Jquery you may use the following code snippet, that validate in email address using regex.
Continue Reading »

Tags: , , , , , , , , , , , ,

cPanel: How To Disable Email Service Only For a Domain

Some time you may need to disable a domain’s email service only, e.g. you have some non-payment issue with a client and you want to secretly disable email only without suspending the account/site or for some purpose you want to let the site running and just to disable emails.

I have searched a lot about the solution but couldn’t find when needed, then i did a trick that worked so thought to share with you guys.
Continue Reading »

Tags: , , , , , , , , , , , , , ,

WordPress: Automatically Expire Posts After Specific Date/Time

Some time you may not want to keep a post published on your wordpress blog e.g. announcing some promotion, events etc. Instead of permanently deleting that post you may hide/expire that from your articles.

For the purpose you can replace the existing posts looping code with the following in your posts page (where it’s looping the posts usually index.php, archive.php etc.)
Continue Reading »

Tags: , , , , , , , , , , , , ,

Sendmail: How to Clear/Flush Sendmail Queue

Some time you want to clear/delete/flush all messages in current sendmail queue. You may follow the instructions below for the purpose.
Continue Reading »

Tags: , , , , , , , , , , ,