Tag: hack

Bringing Cisco IOS CLI to Linux CLI

There are few people on the globe who loves to work with Cisco and Linux via CLI. These people might have issues with trying to apply Bash/Vim syntax to IOS and vice versa. I’m certainly one of them. That’s why I can do the followng in my Bash:

$ show .bashrc | i return
[[ "$-" != *i* ]] && return
#     return 0
#     [[ -z $adir ]] && return 1
#   [[ $? -ne 0 ]] && return 1
#     [[ $? -ne 0 ]] && return 0
#   return 0

It’s very handy for checking Cisco configs, stored on a Unix machines, without inverting your mind out. In fact, if you are in rush and tried to apply IOS syntax to Bash, you won’t be distracted by an error message, but you’d get a result you reqired.

$ show samle_conf.cfg | i spanning-tree
spanning-tree mode rapid-pvst
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
spanning-tree pathcost method long
 spanning-tree portfast
 spanning-tree portfast
 spanning-tree portfast
spanning-tree bpduguard enable

It’s achieved very easily. You need to add some aliases to your ~/.bashrc file and relogin:

echo 'alias show="cat"' >> ~/.bashrc
echo 'alias i="grep --color"' >> ~/.bashrc

Speed up Firefox 3.5 on Fedora 11.

Since I moved to Fedora 10, I noticed Firefox became noticeably slower than before. Start-up was taking about 30 seconds. Even right click menu appearance had noticeable delay. I suspected plug-ins. I minimized amount of my plug-ins twice. It didn’t help.

After I suspected history and private data database. I tried to clean up history manually, but it did not decrease its size. Deleted entries were just marked as deleted, but kept remain in database. There was the last hope – trying to delete places.sqlite file manually. I had a hope that Firefox checks existence of database and recreates it in case of absence. And yes – it does it! It increased starting speed for about 5 seconds.

To eliminate large-history-problem in the future, I set a limit on it. You just need to go to about:config page and set a search filter to browser.history. Th following values need to be changed:




Personally, I set them to 30, 15 and 5000 accordingly. You may choose another values.

My last concern was language packs. There are all possible language packs installed and enabled by default in fedora’s Firefox. I disabled them all (a lot of clicking), except Russian and English ones. Miracle! Firefox starts up several times faster! Now it takes about 7 seconds only!