Fresh from the Labs

 in

from whichever directory you've extracted it to. If your system is set up right, you also might be able to run it simply by clicking on it in your file manager.

If you would prefer to compile it (if you don't have an i586-compatible processor, for example), that's also very easy. Simply download and extract the tarball provided on the Web site, and open a terminal in the new beediff folder.

As root or sudo, run the command:

# ./install 

and the script will do all the compiling and installation for you.

Once this is done, entering beediff at the command line should launch the program.

At first, I had an error running the binary or compiling it, and it was due to having old libraries installed. When I went to run the binary, I got this:

nhoj@ubuntu:~/src/beediff_1.5_i586/beediff$ beediff
beediff: symbol lookup error: beediff: undefined symbol:
_ZN10QBoxLayout10setSpacingEi

And, I got this with the source compilation:

QBtSeparator.cpp:139: error: 'const class QColor' 
 ↪has no member named 'darker'
QBtSeparator.cpp:142: error: 'const class QColor' 
 ↪has no member named 'darker'
QBtSeparator.cpp:145: error: 'const class QColor' 
 ↪has no member named 'darker'
make: *** [tmp/QBtSeparator.o] Error 1
install: cannot stat `beediff': No such file or directory
nhoj@ubuntu:~/src/beediff$

BeeDiff requires at least Qt 4.3—Piotr the author was using 4.3.2. Install the latest version you can along with the development libraries. Once I installed these, BeeDiff ran, binary and source included.

Usage

BeeDiff is pretty much geared for comparing two files that have the same origin, so comparing pieces of code and scripts will be the best use of BeeDiff's abilities. Fire up BeeDiff and once inside, you'll notice two main panes. Here, you will load a text file into each one. The left pane is the original, and the right pane is for comparing against it. On the top right of each pane is a button to browse for the file you want to load.

Once loaded, any different lines will be highlighted in different colors:

  • Red: lines that have been deleted.

  • Blue: lines that have been added.

  • Yellow-green: lines that have been changed.

After analyzing what lines are different, you then can take several actions. Along the toolbar to the right (and in the menu under Operations) are four icons: Remove all from left, Remove all from right, Merge all to left and Merge all to right. The Remove buttons obviously delete the text in question, but the Merge buttons let you grab any divergent lines and copy them across to the other file and save it—very handy.

BeeDiff is another no-nonsense application that does what it says on the tin and doesn't pretend to be anything else. This program should save scripters and coders many a late night of headaches and may prove to be quite handy in this time of common allegations between companies and projects of “stolen code”.

First up, this is a YouTube downloader. Not very interesting, as everyone has used them before, right? Indeed, but a few months back, YouTube changed some embedding options, rendering most of these lovely tools useless. Well, this little script has been updated and downloads YouTube videos just fine. To install, simply save the URL provided onto your hard drive—that's it! Make sure you save the filename as is though, not with an .html extension.

Figure 3. youtube-dl—a Groovy Command-Line Utility to Save YouTube Videos to Hard Drive

To use it, open a console in the directory where you saved the file. Make sure you can execute the file by entering:

$ chmod u+x youtube-dl

Now you're ready to go! Find your favorite YouTube clip and copy its URL. Go back to your console and enter ./youtube-dl, and paste the clip's URL after it, like so:

$ ./youtube-dl http://youtube.com/watch?v=tNTWwbYYlgU

youtube-dl now saves it to your hard drive, and it even has a spiffy text-based progress monitor. Once downloaded, the filename just looks like random garbage. Rename the file to nameofyourvideo.flv (the .flv extension is the most important part), and open it with a strong video player such as VideoLAN or MPlayer.

______________________

John Knight is the New Projects columnist for Linux Journal.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix