Blog

  • MySQL: how to delete all records from a table

    There can be many reasons to delete all records in a MySQL Database table and there are two ways you can acheive this using the “truncate” command or by using the “delete” command. While the ultimate net result is the same, there are differences you should know.

    (more…)

  • Python: Remove last ‘n’ characters of a string

    To remove the last ‘n’ characters of a string

    'string'[:-n]

    or

    stringVariable[:-n]

    (more…)

  • How to block select in PuTTY

    In PuTTY, left-click and drag normally selects and copies the entire line content. However, you can change this behaviour to block select like in a MS DOS window.

    (more…)

  • How to enable/disable Right-click paste in PuTTY

    In PuTTY, right-click on the mouse is configured to automatically pastes the contents from the clip-board. While this is a great convenience, it is equally dangerous when you are logged onto live production systems. Have you pasted “reboot” and pressed enter without realizing what you’ve done??

    (more…)

  • How to change the HOST key in Oracle Virtualbox Manager

    Oracle Virtualbox by default has Right CTRL key assigned as the HOST key. HOST key is a special key on your keyboard which Virtualbox reservers to return ownership of keyboard and mouse to your host operating system. This however can be changed to the one you prefer. Say for instance, if you want to change it to Left ALT (same as VMWare).

    (more…)

  • FileZilla FTP Client configuration through BlueCoat proxy

    If you are attached to a corporate or an enterprise network and connect to internet from behind a BlueCoat proxy which proxies FTP connections then FileZilla FTP client needs needs to be configured accordingly to get it work properly. There is an FTP proxy configuration and a Generic Proxy configuration that can be set in FileZilla client.

    (more…)

  • Unable to delete Stale/Obsolete statc routes in Cisco IOS

    Today, I had to troubleshoot a very peculiar problem on my Cisco Catalyst 3750 switches in two different sites. To cut a long story short, both the sites originally had IPSec VPNs over ADSL internet andtherefore static routes added to pass through their VPN firewalls. However, with a recent WAN migration with leased lines, all traffic moved to the WAN routers.

    However, the Static Routes became stale (obsolete) and we were unable to delete the static routes. The routes are not in the running config (no “ip route command in config”) and a reboot wouldn’t help.

    (more…)