Archive for the 'Utilities' Category
Posted by Raghu on June 23, 2008
I’ve always hated the fact that on Ubuntu with the default themes, there’s far too much space wasted. The buttons are too tall, the treeview wastes too much space so that if you’re on eclipse or some other ide, you see a precious few items on the screen.
I’ve been trying to tweak it to no end - even looking to see if there are any ~/.gtkrc-2.0 tweaks. Found a few links such as this Making Eclipse look good on Linux - Max’s blog - however, didn’t really satisfy my need.
And so it stayed until today when I came across Clearlooks Compact Gnome Theme.
I love it - one more for my list of must-haves!
Posted in IDE, Linux, Rant, Tips, Troubleshooting, Utilities | Tagged: Tips, ubuntu, gnome, theme, compact | No Comments »
Posted by Raghu on June 18, 2008
Can’t believe I didnt come across this before - if you’ve gotten used taming your hdd by creating links to folders and have been annoyed with the lack of symlinks and hardlinks on NTFS, then despair no more. I’ve been using Mark Russinovich’s (of sysinternals fame) tool - junction.exe all this while and though it works great, have always wanted something that would integrate with Explorer too. For an in-depth discussion - read http://shell-shocked.org/article.php?id=284 Anyways, I’m extremely happy with NTFS Link - this will surely go into my list of “Must have tools - install immediately on a new machine” list 
Posted in Tips, Tools, Utilities, Very Cool | No Comments »
Posted by Raghu on June 12, 2008
Ok - this was easy - and while there’s some resources on google, I had to figure out a few itty bitty things for my work VPN setup.
install
- network-manager-pptp
- pptp-linux
Restart network manager with
killall nm-applet
sudo /etc/init.d/dbus restart
nm-applet –sm-disable &
Configure VPN settings
Click on the network manager applet and click on VPN connections
- Create a new VPN connection
- Ensure that you select Refuse CHAP in the authentication tab.
- In the routing tab, you can give netmasks that need to go through VPN - for my work network, I have: 10.10.5.0/24 172.16.106.0/24
That’s it. Now click on the Network applet, and connect to your VPN. In the authentication dialog, use <domain>\username and your windows domain password.
Posted in Linux, Tips, Tools, Utilities | No Comments »
Posted by Raghu on March 28, 2008
Recently, started fiddling around with how to monitor and graph performance data on linux boxes. Other than the usual tools like top and vmstat, which are either interactive (top) or too textual to do anything much.
First off, vmstat, doesnt lend itself well to graphing without additional scripts to lay out the data so tools like gnuplot can be used. Secondly, and more seriously, it doesn’t include a timestamp in the output.
Looking around a bit found that dstat seems to be a good replacement to vmstat (and iostat) - and the generated data is consumable with gnuplot.
Here’s a quick example of generating graphs for CPU user, system and idle times
dstat -tc 5 500 > dstat.raw
now fire up gnuplot and go ahead and plot it
gnuplot> set xdata time gnuplot> set timefmt "%s" gnuplot> set format x "%M:%S" gnuplot> plot "dstat.raw" using 1:2 title "User" with lines, "dstat.raw" using 1:3 title "Sys" with lines, "dstat.raw" using 1:4 title "Idle" using lines
To make gnuplot generat an output file, you need
gnuplot> set term png
gnuplot> set output “dstat.png”
gnuplot> replot

And you’re done. here’s the graph generated on my machine. There’s loads more that you can do - and admittedly, you can do everything by dumping your file to excel. However, that doesn’t lend itself well to a completely automated process. When you’re doing performance testing and such like, you will likely repeat this enough number of times. Not having to do it manually helps big time!
Posted in Cygwin, HOWTO, Linux, Tips, Tools, Utilities | 1 Comment »
Posted by Raghu on March 27, 2008
XMLStarlet is great for slicing and dicing huge XML files. Had a run in recently - had a 80 Mb XML file in a single line :D. Guess what, most editors that I tried balked and fell over. This was on a 2Gig Core2 Duo machine.
XMLSpy, vi, emacs, notepad++ all died - and trying to do something with a 80 Gig XML where the 80 gigs are on a single line isnt much fun. So the first order of business was to pretty print the XML. XMLstarlet worked great -
xmlstarlet fo file.xml > output.xml
and you’re done.
The next order of business was that we needed to validate the XML document against a schema. Our first attempt was with Sun’s multi schema validator (MSV). MSV does not validate the whole document but instead stops after a certain number of failures. So, MSV - out, XMLStarlet in. XMLStarlet can validate documents again W3C schema, DTD or a RELAXNG schema.
xmlstarlet val --err --xsd schema.xsd input.xml > errors.txt
And presto! - you get an error report that you can slice and dice with sed/awk or anything else at all.
XMLStarlet also allows you to write Xpaths to query the xml - however, I found the syntax too weird and round about. A better alternative is a perl based solutions - XSH2 - a command line xml editing shell. You can install it under cygwin and it supports basic command pipelining and redirection.
So go ahead and launch XSH. At your cygwin prompt
[~]xsh
—————————————
xsh - XML Editing Shell version 2.1.1
—————————————
Copyright (c) 2002 Petr Pajas.
This is free software, you may use it and distribute it under
either the GNU GPL Version 2, or under the Perl Artistic License.
Using terminal type: Term::ReadLine::Gnu
Hint: Type `help’ or `help | less’ to get more help.
$scratch/>
Now, lets load up our document, type
$scratch/>$x:=open formatted.xml
Your prompt changes to
$x/>
So go ahead and try a few xpaths
$x/> ls /path/to/node
and XSH prints out the matching nodes. Now what if you need to create a document fragment of nodes matching a certain xpath? Piece of cake - do ahead
$x/> ls /path/to/node | tee fragment.xml
XSH2 has many, many more features - but this should be good enough to get you off the ground.
Posted in HOWTO, Tips, Tools, Utilities, XML | No Comments »
Posted by Raghu on July 2, 2007
Okay - for the past few days I’ve been irritated with the browsing experience at home. Pages (google reader, Yahoo mail etc seemed inexplicably slower than before - but they’d load alright - just seemed that teeny weeny bit slower that’s enough to leave you suspicious).
I first suspected my ISP (verizon) for frequent dropped connections (saw the DSL modem lights reset a couple of times a day), then my wifi modem (not a high end one), then spyware/malware. So after the usual barrage of tests - wifi interference sources/anti virus/anti spyware/cable tests etc, I still hadn’t nailed it.
Finally, used procexp ( you can use plain ‘ole Task manager too - this is just flashier) and saw that FF had 330 MB of RAM with 3 or 4 tabs. Also, just plain clicking on a text box was slow, typing into a text field would echo characters after a noticeable delay - so this was definitely a browser problem.
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
– Sherlock Holmes
Ain’t that an apt quote??? I love the addons I have and probably I have one too many. This page on problematic addons was a life-saver - after disabling a bunch of infrequently used addons (stumble upon toolbar, google toolbar, browser sync, adblock filterset g, foxy tunes and some more), I’m back in browsing heaven. The only addons I have now enabled are
- diigo toolbar
- all in one gestures
- Adblock
- Flashgot
- Piclens
What a relief!
BTW, addons are also the latest attack vector. So be wary of who you let into your browser!
Posted in Firefox, Tips, Troubleshooting, Utilities | No Comments »
Posted by Raghu on June 28, 2007
discovered Piclens
Its a great addin for firefox - and integrates with Flickr to give you full screen slideshows a’la Picasa slideshows on your machine!! Its a bit tricky to figure out how to get it to work - Just hover any picture on any page and click on the blue bubbly overlay button that appears
Posted in Tips, Tools, Utilities, Very Cool | No Comments »
Posted by Raghu on March 16, 2007
Ninotech Path Copy 4
Novell Cool Solutions: Cool Tool
Was looking for a shell extension to copy filenames from explorer. Thought there’d be a dime a dozen - and it turns out that
a) they have 20 other things that I dont want.
b) Its trial ware.
Finally after searching high and low, came across this and it’s GREAT!
powered by performancing firefox
Posted in Tips, Utilities | No Comments »
Posted by Raghu on February 24, 2007
Posted in Tips, Utilities | No Comments »
Posted by Raghu on February 24, 2007
GAIM…
I hate running 3 different chat clients (yahoo, msn, gtalk) on my machine - and that’s just 3x memory, startup programs and useless adversting too many.
And I hate msn and yahoo’s advertising that’s built into their clients…esp on MSN which insists on opening a mini page on login…
Use GAIM - and do yourself a favour. Of course that’s if you don’t need the very specialized features :)).
Installation is a breeze and use plugins you like and avoid the bloat….The best plugins I like are guifications and text replace. Lastly, if you keep moving between machines as much as I do, then its a breeze to retain your settings between all your machines.
Posted in Utilities | No Comments »