Software written in Bash.
$ name-by-date.sh *.JPG DSC_0350.JPG taken on "2010.07.02.08.36.20" DSC_0356.JPG taken on "2010.07.02.08.38.10" ...
name-by-date.sh uses the
exif command line interface to
libexif to extract the date from the picture's metadata, so you'll
have to install that first.
$ imapquota -s imap.mail.drexel.edu email@example.com Password: Used 92693 of 102400 KB 90.5 percent
bash script to display the available battery charge.is a
When I'm running X, I usually monitor battery charge with conky,
but I wanted a script to allow quick status checks from the command
line. You can dig into
/sys/class/power_supply/ if you like, but
the [acpi client] (
sys-power/acpi) provides a nicer interface:
$ acpi -b Battery 0: Discharging, 99%, 05:06:14 remaining
-1 "cache-file.sh -l saves" -2 "cache-file.sh trash" -2 "cache-file.sh -r"
~/.pqivrc, you can hard link the current picture to
.cache-saves/ or by pressing 1, move the current picture to
.cache-trash/ by pressing 2, or restore the current picture from the
caches by pressing 3. The
.cache-*/ directory is in the same
directory as the image file, and will be created if it doesn't exist.
Not very complicated, but useful for quickly removing almost-duplicates, blurry pictures, etc.
passwd-gen.sh is a
/dev/random sanitizer for generating random
passwords of various length and complexity.
$ ./passwd-gen.sh 16 WYQwDY0fVpfouu6O Length of password: 16 Total bytes read: 73 Device: /dev/random Set: [:alnum:]
The script is well commented, so there's not much more to say here...
You will almost certainly have to adjust my ALARM_SOUND_CMD to play a
file that exists on your system. Try
locate *.wav to see what's
already there, or grab something new :).
The Bourne Again Shell is a very widely adopted Unix shell, and is the default shell for many distributions. Mendel Cooper's Advanced Bash Scripting Guide is an excellent resource, and there is also a nicely detailed manual.
The clickloc.tk micro-app just opens an image file and prints out the pixel coordinates of any mouse clicks upon it. I use it to get rough numbers from journal figures. You can use scale click.py to convert the output to units of your choice, if you use your first four clicks to mark out the coordinate system (xmin,anything), (xmax,anything), (anything,ymin), and (anything,ymax).
$ pdfimages article.pdf fig $ clickloc.tk fig-000.ppm > fig-000.pixels $ scale_click.py 0 10 5 20 fig-000.pixels > fig-000.data
Take a look at plotpick for grabbing points from raw datafiles (which is more accurate and easier than reverse engineering images).
I just discovered
inotify and it's command-line incarnation
Debian). Now I can watch the data come in from home. If only I had
the laser- and photodiode-alignment screws motorized... Anyhow,