Check These Out
This uses Text::Highlight to output the specified Perl file with syntax highlighting. A better alternative is my App::perlhl - find it on the CPAN: http://p3rl.org/App::perlhl
Sometimes you need to use a port that is already opened by some program , and you don't know who to "kill" for it to release - so, now you do !
This command will disable the beep sound from the PC speaker.
This is a very simple and lightweight way to play DI.FM stations
For a more complete version of the command with proper strings in the menu, try: (couldnt fit in the command field above)
$zenity --list --width 500 --height 500 --title 'DI.FM' --text 'Pick a Radio' --column 'radio' --column 'url' --print-column 2 $(curl -s http://www.di.fm/ | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer
This command line parses the html returned from http://di.fm and display all radio stations in a nice graphical menu. After the radio is chosen, the url is passed to mplayer so the music can start
dependencies:
- x11 with gtk environment
- zenity: simple app for displaying gtk menus (sudo apt-get install zenity on ubuntu)
- mplayer: simple audio player (sudo apt-get install mplayer on ubuntu)
Using this command you can track a moment when usb device was attached.
Very basic, but who knows..
mkdir !$ should work too, only uses 'the last' argument.
!-2 executes cd Desktop/Notes again.
More tips in 'man history'
GNU Sed can 'address' between two regex, but it continues parsing through to the end of the file. This slight alteration causes it to terminate reading the input file once the STOP match is made.
In my example I have included an extra '/START/d' as my 'start' marker line contains the 'stop' string (I'm extracting data between 'resets' and using the time stamp as the 'start').
My previous coding using grep is slightly faster near the end of the file, but overall (extracting all the reset cycles in turn) the new SED method is quicker and a lot neater.
--open -sV
is not needed if you are only looking for hosts with 22 open