Tuesday, May 21, 2013

Remove the stupid onscreen keyboard input from an example banking website

The onscreen keyboard input is a security feature in many website, especially banking websites. It is only useful if you are accessing your account from a public machine (which is not a good practice anyway). On such computers, a spyware may be monitoring your keyboard strokes and will have access to your typed password. However, on your own computer, if you are vigilant enough, there is no such need for such keyboard.

Here are 2 userscripts that will enable the normal keyboard input for QIB banking website on the main and the transaction pages. You will need Tampermonkey to get them working on Google Chrome, or Greasemonkey for Firefox.

After installing the above browser extensions, just follow the following links and click on "Install" on the very top of the page. Once your browser shows the main and transaction pages, it will automatically enable the password fields so that you can freely type your passwords.

  1. Enable main page password field
  2. Enable transaction page password field
The script can be extended to work on any page by looking for read-only fields and enabling them, I will do this later inshaAllah :)


Read more...

Wednesday, April 3, 2013

[Linux/Mac] Always leave your trash occupied, but not full

Some people have a common "bad" practice of deleting items permanently as seeing the Trash (Recycle Bin for poor Windows users) non-empty provokes them! Rule of thumb: don't ever permanently delete your files, the trash is a great feature, so please use it! You never know when you will need those files again.

However, by time your trash size will grow up and take a lot of space of your storage. No, I won't ask you to empty it every now and then. The best practice is to only delete files that are older than a specific date, lets say 30 days.

To be short, this is a little bash script that will calculate the total trash size then deletes those old items and print again the new size:

victim=~/.Trash
echo Calculating $victim size...
echo $victim size: `du -sh $victim | cut -f1`
echo -n "Emptying $victim items older than 30 days, please be patient..."
find $victim -mtime +30d -exec rm -fr {} \; &> /dev/null
echo Done
echo Current $victim size: `du -sh $victim | cut -f1`

You can change the victim to ~/Downloads or whatsoever, you can also change the number of days to weeks or months or whatsoever. Use it at your own risk :) For your convenience I have created 2 scripts, one for Trash, the other for Downloads. Download them to your home and just execute them whenever you run out of space.
./empty-trash-older-than-30d.sh
./empty-downloads-older-than-30d.sh

Read more...