Archive for the ‘Tools’ Category

Write into multiple ssh screens at once

September 15th, 2011 No comments

Sometimes I need to write commands to a handful of SSH sessions at once. I use putty terminal from Windows and did not find anything useful. So I let myself inspired by Rusty Klophaus’s pecho and wrote a Perl script, which is little bit more gentle to the escape sequences and than a small bash script which will nicely open multiple SSH sessions to given list of hosts. The nice think is that this works almost everywhere and does not need more than one standard Perl library on the writer side (on CentOS just run yum install perl-TermReadKey).

Categories: Missing Answers, Tools Tags:

Show Site IP of the currently loaded web page in Firefox

May 6th, 2011 6 comments

I play quite often with /etc/hosts file (well I’m on window so I use C:\WINDOWS\system32\drivers\etc\hosts), or I even switch DNS to our development server using following Windows command (make sure your network connection is called LAN):
# Switch to development DNS
netsh interface ip set dns "LAN" static primary
ipconfig /flushdns

# Switch back to DHCP
netsh interface ip set dns "LAN" source=dhcp
ipconfig /flushdns

All this is done to work with the real domain names already during development – no worry, we do some things by changing the top level domain to .dev, but I simply need both.

Now I need a tool which tells me quickly whether I’m in prod or dev. I was using ShowIP Firefox Extension , but it somehow behaved incorrectly for me – mainly looked like some caching problems.

So I decided to write my own extension which would be dead simple and would simply show me the current IP address of the domain loaded in the current tab. So I wrote it using Mozilla Add-on Builder. It took me less time than to write this post (ok, I have spent 2 years developing AllPeers and some months as Mozilla contractor on Firefox 3).

After installing the AlertIP Extension customize your toolbar and add the star icon (the default icon for extensions) to your toolbar.

Categories: Tools Tags: