You browse your hard drive(s) and you want to copy/move several files to somewhere else. If the files are big (e.g. movies), then you need to wait minutes until a copy/move operation finishes. If the files are in different folders, you cannot select them all. If you try to launch each operation in the background, your machine will get very slow since all these operations will run concurrently.
Clearly, copy/move operations should be put in a queue and the next operation should start when the previous one terminates.
Under Windows you have Total Commander (F5/F6, then F2), but how to do it under Linux? Should I use Total Commander with wine? :) Under Linux I use Midnight Commander but in MC I didn’t find this feature. There is another Norton Commander clone called Krusader that has this feature but I didn’t like it much. I prefer MC :)
So, I came up with the following solution: create two command-line scripts called “cpq” and “mvq” that work like cp and mv (actually they call cp and mv) but they put tasks in a queue. These scripts launch a daemon process if necessary that executes each copy/move operation one after the other.
The project can be found here (https://github.com/jabbalaci/Copy-Queue) where you can also find a description about its installation.
Pierre (alias Deimos) wrote about “cpq” and “mvq” in his blog in French: Copy-Queue : un manager de copie de fichiers en ligne de commande.
Today I found an interesting Unix command by accident. It converts numbers to English:
$ number 961428808 nine hundred sixty-one million. four hundred twenty-eight thousand. eight hundred eight.
It works with much bigger numbers too.
A few weeks ago I bought a Targus laser presentation remote, model AMP13EU. I can report that it works perfectly on my Ubuntu box. I tested it under Ubuntu 12.10 and 12.04.
The user manual doesn’t mention Linux :( It says it works with Windows and Mac OS so when I bought it, I was just hoping that it would work with Linux too. Thank God it works like a charm.
After connecting its USB receiver, “
dmesg” produces the following output:
[ 3150.204455] usb 1-1.6: new full-speed USB device number 4 using ehci_hcd [ 3150.300357] usb 1-1.6: New USB device found, idVendor=1048, idProduct=07d3 [ 3150.300361] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 3150.300364] usb 1-1.6: Product: Laser Presentation Remote [ 3150.300367] usb 1-1.6: Manufacturer: Targus [ 3150.302437] input: Targus Laser Presentation Remote as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input19 [ 3150.302631] hid-generic 0003:1048:07D3.0005: input,hidraw4: USB HID v1.11 Keyboard [Targus Laser Presentation Remote] on usb-0000:00:1a.0-1.6/input0 [ 3150.305049] input: Targus Laser Presentation Remote as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/input/input20 [ 3150.305304] hid-generic 0003:1048:07D3.0006: input,hidraw5: USB HID v1.11 Mouse [Targus Laser Presentation Remote] on usb-0000:00:1a.0-1.6/input1 [ 3150.308158] input: Targus Laser Presentation Remote as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.2/input/input21 [ 3150.308331] hid-generic 0003:1048:07D3.0007: input,hiddev0,hidraw6: USB HID v1.11 Keyboard [Targus Laser Presentation Remote] on usb-0000:00:1a.0-1.6/input2
There is a webpage with lots of useful information and you want to highlight/annotate some parts of it for future references.
In my current case, I want to watch the videos of PyCon US 2013 but I don’t have much time so it will take some weeks till I finish them. In the meantime, I don’t want to forget which ones I had already seen. It would be nice if I could add some custom notes to the webpage that lists the videos. In addition, I want to see/edit my annotations at home and at my workplace too, i.e. it should be web-based.
Marker.to is a browser extension that does exactly this.
“Have you ever used a marker pen for highlighting your paper documents?
Marker.to will do the same for webpages! After you install a browser extension or bookmarklet and run Marker simply by clicking on the icon, you can highlight text on a website with your mouse.
Annotating helps to point out important information in long articles. Our annotator creates a special link for the highlighted version of the page (like http://marker.to/XYZ123). You can share it through Twitter, Facebook, e-mail, IM etc. Or just bookmark it with your favorite bookmarking tool, i.e. Delicious.
You can view highlighted page with any browser! No bookmarklet or browser extension is necessary for viewing.” (source)
- Top Web Annotation and Markup Tools (I didn’t try all of them)
You have two text files,
long.txt contains some extra lines. Which are these lines? That is, you want to perform a set difference:
L \ S.
You can do this with the “
First, make sure that the two files are sorted. Then:
comm -23 long_sorted.txt short_sorted.txt
$ cat as.txt sl-1215 sl-2112 sl-9023 sl-9029 $ $ cat bs.txt sl-1215 sl-2112 sl-9012 sl-9016 sl-9023 sl-9029 $ $ comm -23 bs.txt as.txt sl-9012 sl-9016 $
Find more examples on “
comm” here (like union, etc.)
There are some great audio codecs for FFmpeg which are open source but not completely compatible with GPL, thus they are not included in the FFmpeg package that you can install from the official repositories.
If you want these codecs, you must compile your own FFmpeg.
Here you can find a nice description of the available audio codecs. Which one should you use? In short, they come in this order:
libfaac > Native FFmpeg AAC ≥
libfdk_aac provides the best quality.
You can download static builds from here but they don’t include
libfaac either :(
Fortunately, compiling FFmpeg under Ubuntu is quite easy. You just need to follow this guide.
I have an installer script for Ubuntu called jabbatron. The new version of this script includes (1) compiling FFmpeg, and (2) updating FFmpeg. They are available under the menu point “(170) install from source (mc, tesseract3, ffmpeg)…”. This script automates all the steps that are described in the aforementioned guide.