May 30th, 2004
A script designed to automate the process of DVD backing up. Automates the process all the way from ripping and encoding to subtitles, naming, and ejection. Requires mplayer (and subsequently mencoder). I enjoyed using this script very much, I'd place a DVD in the drive, run the quick command, then come back later to find the DVD ejected and a fresh DivX waiting for me.
Downloads
Tags: cli, perl, movies
Comment on 'DVD Ripper'
May 1st, 2004
This is a rewrite of another common UNIX application which can be used to kill all process matching a certain name. However, the major change between that and this version is that it utilizes regular expressions and can be quite deadly. Definitely not recommended use in any sane situation.
Downloads
Tags: cli, perl, unix
Comment on 'killall Rewrite'
April 15th, 2004
Another commonly used UNIX utility that I decided to quickly re-write, for fun. Takes a files a strips all the \r characters out, returning a pure UNIX-endline based file. The resulting snippet can be found below:
print map{s/\r//g;$_}<>;
Tags: cli, snippet, perl, unix
Comment on 'dos2unix Rewrite'
April 2nd, 2004
This handy command-line audio interface has been my staple for a long time. I enjoy using it to quickly pop into a directory and finding something random to listen to. It's designed to sit on top of another player, for example 'mplayer', and then pass all commands through to it. I've used it for audio, video, and shoutcast streams. The main options are:
- Play Music Randomly - The default. Will play random songs from your playlist, making sure never to never play a song twice.
- Linear Play (-l) - By providing the -l option, mrand will play through everything in order of which it was found. It's very good about figuring out which file actually comes before another.
Downloads
Tags: cli, perl, music
Comment on 'Music Randomizer'
March 17th, 2004
This was a little challenge that I made for myself: Duplicate most of the features of the command-line 'bc' application in the fewest number of characters. The results:
eval('$o='.<>.';print\"$o\n\"')while(1);
Tags: cli, snippet, perl, unix
Comment on 'bc Rewrite'
February 22nd, 2004
This is a short little shell script which executes the right commands to generate and display a PDF from a latex file. I, personally, named it 'pdf' and just placed it in my ~/bin/ directory. The code for this can be found below:
#!/bin/sh pdflatex $1 bibtex $1 pdflatex $1 pdflatex $1 rm \"$1.aux\" rm \"$1.bbl\" rm \"$1.blg\" rm \"$1.log\" rm \"$1.toc\" xpdf \"$1.pdf\" &
Tags: cli, shell, latex
1 Comment on 'latex2pdf'
December 2nd, 2003
This was a little chunk of code that I pulled together so that I could quickly view the textual contents of a Word Document. This can be used as a command line tool and does the trick fairly well, in my opinion. Of course, you will lose a lot of contextual information, so take it with a grain of salt. The code is provided below:
#!/usr/bin/perl use Text::Wrap; $Text::Wrap::columns = 80; my $file = join( '', <> ); $file =~ s/<[^>]*>//g; $file =~ s/\r//g; $file =~ s/[\t ]+/ /g; $file =~ s/\ //g; print wrap( '', '', $file );
Tags: convertor, cli, snippet, perl
1 Comment on 'Word Document to Text'
September 26th, 2003
This is a command-line utility built to ease the process of dropping drinks from the CSH networked soda drink machine. After becoming semi-addicted to Sunkist soda, I just had to find better ways of getting my fix, and this script is the result of that!
Features:
- Ability to querty multiple drink servers
- Dynamic checking of slots for drink location
- Auto-Contacting of Drink Admin when drink is run out
- Less operations then using the standard telnet or web interfaces
Download:
Tags: csh, cli, perl
Comment on 'CSH Drink Dropper'