Author Archives: Kapil Chugh

About Kapil Chugh

In love with PHP and tweaking WordPress. Hungry for Open Source and new technologies. Honest. God-fearing. Happiest when solving problems.

All in one Ubuntu commands

apt-get install vim lamp-server^ phpmyadmin kate php-pear php5-curl thunderbird ssh rar unrar gimp wine chromium-browser opera zip unzip aptitude php5-sqlite php5-memcache php5-apc php5-pgsql Advertisements

Posted in Ubuntu | Tagged , | Leave a comment

Custom Paging in WordPress

It is sometimes required in WordPress that you need to include your own paging.This is how i have done it. $rss = fetch_feed($feed_url); if (!is_wp_error( $rss ) ) { $limit = 15; $page = $_GET[‘page’]; if ((!$page) || (is_numeric($page) == … Continue reading

Posted in WordPress | Tagged , | Leave a comment

Case Sensitive Mysql Query

By default Mysql queries are case insensitive.If we want to make it case sensitive then syntax will be SELECT *  FROM  table  WHERE  BINARY column = ‘value’ We just need to add keyword Binary.

Posted in Mysql | Tagged , | 2 Comments

Password Protect a folder or page using apache

Make sure you have AllowOverride All First Create any dummy file at any location.For eg i have created pass.txt in /ete/ folder touch /etc/pass.txt In .htaccess write this code AuthName “Restricted” AuthType Basic AuthUserFile /etc/pass.txt Require valid-user Then Write this … Continue reading

Posted in Apache, Ubuntu | Tagged , , | Leave a comment

Custom Atom rss elements

To show custom fields in atom rss we need to thing (1) first define xmlns:eg=”; in <fee xmlns (2) use tags with the defined name for eg <eg:pagename>value</eg:pagename>

Posted in Uncategorized | Tagged , | Leave a comment

Solution of numeric keypad not working on Ubuntu

I have a Microsoft Keyboard and i don’t know what happened all of a sudden numeric keypad wasn’t working so i though there was some issue in my keyboard so i changed the keyboard but i was surprised to see … Continue reading

Posted in Ubuntu | Tagged , | 2 Comments

Setup Cron on Ubuntu

.—————- minute (0 – 59) | .————- hour (0 – 23) | | .———- day of month (1 – 31) | | | .——- month (1 – 12) OR jan,feb,mar,apr … | | | | .—– day of week (0 … Continue reading

Posted in Ubuntu | Tagged , | Leave a comment