Category Archives: Uncategorized

How to View your Old Notifications in Android

Lost or dismissed your important notification from your android device? Now you want to get it back?  Well if you are having Android JellyBean or later, you can get back your dismissed notification with few easy steps.

Android Notification History
Android Notification History

Simple go to your android home screen and tap App icon. Switch to Widgets tab, and look for 1×1 Settings Shortcut. Place it on your home screen. Now tap on that newly placed icon and select Notifications from list. That’s all. Tap on it to see all pushed notification history in reverse chronological order.

Image via and Kārlis Dambrāns

WordPress Hack: Remove Width And Height Attributes From Images

Whenever you upload any image to your WordPress based website, and you use it in your post, automatically WordPress adds Width and Height attributes to all image elements (i.e. in tags).

This is fine in most of the cases, but if you want to stop WordPress from adding those attributes then you can go with this code.
Continue reading WordPress Hack: Remove Width And Height Attributes From Images

Displaying Posts From A Category In WordPress

It may happen that you are designing some sort of archive pages or a front page and you want to list all posts belonging to some specific category. In this case you can go for following code.

    $idObj = get_category_by_slug('category_slug_here');
    $id = $idObj-&gt;term_id;
    $posts = get_posts('category='.$id.'&amp;orderby=asc&amp;numberposts=10');
    while(have_posts()) {
        /* Do what ever you want with your posts */

One of the best thing about this code is, it lists all the posts from the specified category and if that specified category has child categories, then the code also lists the posts from child categories. That simply means you will have all posts from specified category and its all child category. You have to replace the ‘/* Do what ever you want with your posts */‘ with appropriate code to handle the post listing on the page.

Git: Delete Last Commit

Many times like you, even professional programmers do mistakes. A lot of times it happens that you commit something junk in hurry and then you start looking out for reverting it back. Like you even I have done such mistakes many times and finally I thought to write down a few useful git commands which will help me to revert back to stable copy of project.

Using ‘git reset’

So, if you have committed something junk, not useful but you have not pushed it to remote repository then you can go with

git reset --soft HEAD~1

git reset‘ command will reset your current commit. The ‘HEAD~1‘ mentioned here is nothing but shorthand for your last commit and the ‘–soft’ option specified in the command will keep all the changes in working copy.
Continue reading Git: Delete Last Commit