Friday, 11 December 2015

Remove write protection from your pen drive

Sometimes, your pen drive goes write-protected all of a sudden. 
In this situation, you can not delete or write anything on the flash drive. You cannot even format your own flash drive.

This might happen because of virus, hardware switch or some other reason.
Another fact out of my experience is that hoping to solve the problem with linux distro will not help. The problem persists on every OS.

makeuseof has given it a good shot.
First try those steps on the makeuseof blog, but if they do not work, don't be upset because i have a couple of more ideas to try.

1. Look for the recovery tools provided by the manufacturer of the flash drive
    eg. Transcend : (it worked for me)
2. If it is covered in warranty, return/replace it.
3. Try mUsbFixer from

Tried on : Transcend flash drive 8GB
May work with : other flash drives

Thursday, 3 September 2015

Display battery percentage level indicator on Android Lollipop (without root)

I am a cyanogenmod fan because i love how customizable it is at every aspect. Well, since i have got a new phone now (moto g3 2015), i have to stay away from cyanogenmod for at least a while for two reasons :
  1. Rooting my phone will void the warranty. 
  2. There is not yet any stable Cyanogenmod ROM available.
Due to this i am struggling with many customization tasks. One of them is the battery level indicator. I want it to display battery level in form of percentage but no option for that has been provided in the stock OS of my Moto G 2015. I reached out for a method to achieve battery percentage indicator (without rooting) and found many which i am gonna share with you :

The best one is Battery Percentage.

1. Battery Percentage
Features :
  • Status bar icon 
Pros :
  • Simple and small 
Cons :
  • No additional features 
  • Always takes the space of a notification in the drop down space of android 

2. Batteryminder

    Features :
  •      Customizable status Bar Icon 
  •      Tells the temperature 
  •      Alerts for low battery and fully charged battery 
  •      Widget available 

    Pros :
  • Additional features like alerts for low or full battery 
  • Widget available 

    Cons :
  • Always takes the space of a notification in the drop down space of android. 

3. Battery Widget Reborn (Free)

Features :
  • Highly customizable status icon. 
  • Additional toggles for wifi bluetooth etc. 
  • Motorola 1% hack 
  • Customizable widget option 

Pros :
  • High customizability and many features 

Cons :
  • Always takes the space of a notification in the drop down space of android. 

4. Battery Percent Enabler :

Features :
  • Displays battery percentage within the stock battery icon 
  • Does not require root. 

Pros :
  • Most desirable feature 
  • Does not occupy the notification area 

Cons :
  • Zero customizability 
  • Very small text (hardly readable) 
  • Text does not show when battery is charging 

Battery Percent Enabler could be the best choice only if it could eliminate its cons listed above.

Tested with : Moto G3 2015, Android 5.1.1
May also work with : Any Android Phone

Monday, 13 April 2015

Remove Saleplus malware completely without any anti-malware

SalePlus adware
Recently my laptop got infected by the Saleplus adware/malware from a website. Symptoms are :
1. You see ads on every page you visit even when you have the Adblock Plus installed.
SalePlus ads
SalePlus ads

Saleplus adblock
SalePlus ads even with adblock plus enabled

2. Biased Google search results.
SalePlus google
Expected search results
Saleplus google
Search results altered by SalePlus

3. Slow internet speed.

In my case, only Google chrome was the affected browser. Hence following are the steps to remove it from Google chrome and Windows only. ...

How to get rid of it.....
  1. Uninstall SalePlus from Windows installed Program and features.
    To achieve this in windows 7, press windows button --> Control Panel --> Programs --> Uninstall a Program. After that find "SalePlus" and uninstall it. For other windows versions, steps are almost similar.
  2. Remove it from startup of WIndows.
    Press windows button and type "msconfig", hit enter.
    Goto the Startup and look for suspicious entries. Generally the adware takes the name of whatever file you were trying to download from the infected website. e.g. in my case it was "Eluveitie - The Call of the Mountains".
    Disable such suspicious startup programs. Do not close the window yet.
    Saleplus startup
    Remove SalePlus from startup

    1. Delete its files and folders
      Have a look at its location in the same table in msconfig (previous step) and go to that location i.e. go to "C:\Users\code\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Eluveitie - The Call of the Mountains".
      Right click on the shortcut "Eluveitie - The Call of the Mountains" ---> properties.
      Note down the value in target field and go to that address. e.g. go to "C:\ProgramData\{82d33535-da55-b0aa-82d3-33535da5d4d7}" and delete "{82d33535-da55-b0aa-82d3-33535da5d4d7}" from C:\ProgramData. Also delete the shortcut you found earlier at "C:\Users\code\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Eluveitie - The Call of the Mountains".
    2. Delete C:\ProgramData\4288546593436265821 (or similar folder with date modified same as other two folders in step 2 and step 3.)
    3. Remove the SalePlus extension from Google Chrome.
      Visit chrome://extensions/ (just paste this in chrome address bar)  and enable developer mode.
      Search for SSalePlus and check the "Loaded from: " attribute of the extension. This is the address which allows it to rise from ashes even when you delete the extension from chrome. In my case it is located at C:\ProgramData\ambmpnbogdlmjcmpeejljnhbnmojogeh.
      Delete this directory "ambmpnbogdlmjcmpeejljnhbnmojogeh".
      Also disable and and remove the extension from Google chrome.
      Saleplus chrome
      Saleplus chrome extension

    4. Now close msconfig window from step 2 and restart.
    Now the annoying ads must be gone. All the best.
    Tried on : Windows 7, Google chrome Version 41.0.2272.118 dev-m
    May also work for : Any version of windows, Other browsers

    Tuesday, 7 April 2015

    5 important steps to optimize the speed of your Wordpress website

    I am a Wordpress developer. I tried to optimize the speed of my Wordpress website. After hours of searching i found solutions but most of them didn't work for me. Then i thought, why not try combining some of the working solutions?.. I must tell, the website i was working on was created on Genesis Framework which is the fastest among all the themes we generally use for our websites.
    I will share how i optimized the speed of my Wordpress website.
    Let us jump to the steps without wasting much of your precious time.

    1. Reduce the size of all your images by compressing them, you'll get some online image compressors. Replace .png images with .jpg if possible because a png image increases the server response time which leads to slow pages. One of the online image compressors is :

    2. Try and use minimum javaScript in your website. If you have to use js anyway, put all your js in footer after </body> tag because web pages use top to bottom approach, else it loads the js first and then the content, due to which none of the above-the-fold content(html) on your page may be rendered.
    You can also call your js asynchronously by using async (suggested by google's pagespeed insights ).
    Most of us do not know what exactly calling the js "asynchronously" means. Well according to what i understood after applying async is that your js will load along with your page but it will not block the above-the-fold content.

    3.Try and use background colors instead of images.

    4. Add this code to your .htacess file
    # BEGIN Compress text files
    <ifModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
      AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
      AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
      AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
      AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
      AddOutputFilterByType DEFLATE font/truetype font/opentype
    # END Compress text files
    # BEGIN Expire headers
    <ifModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 300 seconds"
      ExpiresByType image/x-icon "access plus 2592000 seconds"
      ExpiresByType image/jpeg "access plus 2592000 seconds"
      ExpiresByType image/png "access plus 2592000 seconds"
      ExpiresByType image/gif "access plus 2592000 seconds"
      ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
      ExpiresByType text/css "access plus 604800 seconds"
      ExpiresByType text/javascript "access plus 216000 seconds"
      ExpiresByType application/javascript "access plus 216000 seconds"
      ExpiresByType application/x-javascript "access plus 216000 seconds"
      ExpiresByType text/html "access plus 600 seconds"
      ExpiresByType application/xhtml+xml "access plus 600 seconds"
    # END Expire headers
    # BEGIN Cache-Control Headers
    <ifModule mod_headers.c>
      <filesMatch ".(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "public"
      <filesMatch ".(css)$">
        Header set Cache-Control "public"
      <filesMatch ".(js)$">
        Header set Cache-Control "private"
      <filesMatch ".(x?html?|php)$">
        Header set Cache-Control "private, must-revalidate"
    # END Cache-Control Headers
    # BEGIN Turn ETags Off
    FileETag None
    # END Turn ETags Off# Leverage Browser Caching Ninja -- Starts here
    # Do not write anything between "Leverage Browser Caching Ninja -- Starts" and "Leverage Browser Caching Ninja -- Ends"
    # It will be deleted while uninstalling Leverage Browser Caching Ninja plugin
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/javascript "access plus 1 year"
    # Leverage Browser Caching Ninja -- Ends here
    The above code will do the following :
    i) Compress text files
    ii) Enable Cache control headers
    iii) Enable Expire Headers
    iv) Enable Leverage Browser caching Ninja

    5. If you still do not get the desired speed, you may want to minify your css and js as suggested by google page speed insights.
    These five steps got me an optimized website :). Good luck for yours....

    Tried on : Wordpress 4.1
    May work on : Any other Wordpress version


    Wednesday, 18 February 2015

    My tools for competitive programming in java

    Many programmers prefer to compete in online programming competitions by submitting solutions using Java. But one might wonder what tools are best for competitive java programming. Here i am revealing the tools i use for competitive java programming :

    1. Eclipse
    2. Vrapper
    3. Java SE Development kit (jdk)
    4. TCF Terminals
    Features/benefits of this configuration are :
    • All benefits of Eclipse such as :
      • Code Recommenders
      • Intelligent importing
      • Error highlighting
      • Warnings
        and much more.....
    • Enhanced efficiency with VI editor capabilities added to eclipse via Vrapper
      Vrapper can be installed inside eclipse as a plugin and it is one of the best plugins to add VI features to eclipse. Having Vrapper means you have all the power of VI editor.
    • By ensuring the that jdk is installed you can run the 'javac' command and 'java' command right from the command prompt or terminal.
    • By using the terminal for compilation and execution gives you the power of directing stdin input from a file and also stdout output to a file. These features are not yet available in eclipse luna. Ironically this feature is very helpful in studying large outputs and inputs and debugging.
    Steps for using the environment
    1. Create a new java project with any name.
    2. In package explorer, right click on its 'src' package and add new class to it. In the New Java Class dialog make sure to set package field empty i.e. default package.
    3. Now write your program in the class created in step 2.
    4. To run this program make sure jdk is installed properly and the 'javac' command runs properly in the terminal/ command prompt. Now open the terminal/command prompt, compile and run the program using the following command :
    javac && java Solution <in.txt> out.txt
    where is the file name in which code is written and the second command 'java Solution' (where Solution is the name of the class in .java file) runs the compiled program taking input from 'in.txt' in the same folder where exists and writes output to out.txt in the same folder

    Note that this environment can be setup on all popular OS platforms.

    Monday, 16 February 2015

    UIITKODERS UIIT CodeChef leaderboard

    The CodeChef UIITKODERS leaderboard is here.

    Long :
    Short :
    LTime :

    Also if any account which does not belong to a UIITian appears on the leaderboard , you can report to us.

    Wednesday, 4 February 2015

    'link2sd mount script creation wizard appears everytime, unable to mount the 2nd partition' Solution

    Problem Statement:
    In short when you start your link2sd app it prompts you to create mount script by choosing the format of 2nd sd partition, then it asks to reboot device. But after the reboot, link2sd again prompts for script creation........and this loop continues.

    Solution :
    1. Try making second partition using your clockworkmod recovery. If it does not help got to step 2.
    2. Ensure that the format of the second partition is not automatically changing itself. To do this you can follow the following steps:
      1. Insert your memory card into your pc with help of a memory card adapter.
      2. Download , install and run mini tool partition wizard.
      3. Backup important stuff from your sdcard.
      4. Delete every partition on your sdcard and click apply.
      5. After that recreate your desired partitions. This time it won't revert to ext3.. Now you must try to use link2sd and see if the problem is resolved. If not, go to step 2.
    3. As described by NaraRockingMyAce at an xda forum :
      • With help of MiniTool Partition Wizard delete only your second
        partition on sd card. (use sd card adapter, don't do it through data cable).
      • Create the 2nd partition again and make sure to set it as primary.
      • Apply and verify if the problem is resolved.

    Tried on : Sanmsung galaxy min S5570 (tass), Gingerbread, link2sd, minitool partition wizard, FAT32 2nd partition
    May work for : Any android phone