List to CSV
Sometimes you get data in a list format and you need it in comma separated format. Sure, you could open up excel and then use the transpose function but you could also paste it into a simple script.
#!C;\perl\bin
use Win32::Clipboard;
my $clipboard = Win32::Clipboard();
my $out;
while (){
my $tmp = $_;
last if ($_ =~ /^\s*$/);
chomp($tmp);
$out = $out . $tmp . ", ";
}
$return = substr($out, 0,-2);
$clipboard->Set($return);
print $return."\nCopied to Clipboard";
Simply paste your list into the command prompt and the values are copied to your clipboard in CSV format. You could easily expand this simple script to enclose values in qoutes or whatever you may need.
Open Multiple Tabs in IE, Firefox and Chrome
I often find myself working in the same browser windows day after day. Sometimes its at work where I have WLC, Nagios, Unity, CCM and a few others open and then sometimes its at home where I have my bank and a few other bills open in different tabs. Rather than do a bunch of typing URL’s or clicking shortcuts I decided to have them all open at once.
In IE a simple .js script will do the trick:
var bgdTab = 0x1000;
var open = new ActiveXObject("InternetExplorer.Application");
open.Navigate2("http://cnn.com");
open.Navigate2("http://msnbc.com", bgdTab);
open.Navigate2("http://theonion.com", bgdTab);
open.Visible = true;
For Firefox its as simple as a shortcut:
"firefox.exe" google.com cnn.com msnbc.com
and for Chrome another shortcut:
chrome.exe gmail.com google.com
In the grand scheme of things its not a huge time saver but it does get you where you need to go on a monday morning.