A useful command to port mirror cisco 3750
Start Monitor
conf t
monitor session 1 source interface Gigabit 1/0/x
monitor session 1 destination interface Gigabit 1/0/x
End Monitor
conf t
no monitor session 1
A useful command to port mirror cisco 3750
Start Monitor
conf t
monitor session 1 source interface Gigabit 1/0/x
monitor session 1 destination interface Gigabit 1/0/x
End Monitor
conf t
no monitor session 1
Well I got this new IP Phone replacing our old PSTN phones. But the LCD screen on the phone looked bit boring.
There were few ideas how I can use this realestate to do something interseting.
My Ugly Bash Script
#!/bin/bash text=`export http_proxy=http://xx.xx.xx.xx && /usr/local/extractSearch.pl` convert -size 160x75 -monochrome -depth 1 -type Bilevel -gravity center caption:"Twitter Feed\n$text" /var/www/polycom/image.bmp The Perl Script #!/usr/bin/perl # use module use XML::Simple; use LWP::UserAgent; use Data::Dumper; # create object $xml = new XML::Simple; my $url = "http://search.twitter.com/search.atom?q=<Your Query>&rpp=1&page=1&locale=en"; my $ua = LWP::UserAgent->new(); $ua->env_proxy; $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'); $ua->timeout(30); $ua->default_header('pragma' => "no-cache", 'max-age' => '0'); my $res = $ua->get($url); $data = $xml->XMLin($res->content); print "$data->{entry}->{title}"