utilities
-

Exclude files from a list

 

display file or file system status

 

color based on string

Because an MD5 hash is typ­i­cally expressed as a hexa­dec­i­mal num­ber, 32 dig­its long *, all you need to do is cut 6 char­ac­ters to get a color value. COLOR=`echo $SVG | md5sum | cut -c 1-6` To con­vert any string to a color value, just reduce it to the appro­pri­ate char­ac­ters (= a-f and 0–9),...
Find Out My Linux Distribution Name and Version

Find Out My Linux Distribution Name and Version

How do I find out what ver­sion of Linux dis­tri­b­u­tion I’m using from the shell prompt? aptitude install lsb-release   lsb_release -a   Distributor ID: Debian Description: Debian GNU/Linux 6.0.2 (squeeze) Release: 6.0.2 Codename: squeeze Find Out My Linux Dis­tri­b­u­tion Name and Version
Random Number

Random Number

Use of bash’s built-in ran­dom and arith­metic capabilities. echo $((RANDOM%100+1))
words,words,words!

words,words,words!

Included in GNU/Linux (and MacOSx as well) is a stan­dard file, which is just delim­ited list of dic­tio­nary words. * /usr/share/dict/words To select a ran­dom word: cat /usr/share/dict/words | shuf -n 1 Check also the other files in /usr/share/dict. Very useful! If your oper­at­ing sys­tem is miss­ing the shuf–util­ity you can use this: perl -MList::Util -e 'print...
List all available commands

List all available commands

List all available commands.

randomize-word

randomize-word

.

Get a random paragraph

Get a random paragraph

.

Animated gif to pdf sequence

Animated gif to pdf sequence

Con­vert an ani­mated gif to sequence of pdf files. Now you can scale and rotate the images and keep their full pix­elized beauty. FILE=$1 BGCOLOR=88FF99   convert -adaptive-resize 300% \ -interpolate integer \ +antialias -coalesce \ $FILE resize.gif   mv resize.gif coalesce.gif   HSIZE=`identify coalesce.gif | \ cut -d " " -f 3 | \...
QR Code as vector not bitmap

QR Code as vector not bitmap

A sim­ple hack to get a QR code as a vec­tor file, sup­port­ing trans­parency and more suit­able for scal­ing and espe­cially rotat­ing. qren­code only out­puts png. INFO=$1 FILE=tmp.png qrencode -o $FILE "$INFO" autotrace -background-color=FFFFFF \ -corner-threshold 100 \ -corner-always-threshold 200 \ -corner-surround 1 \ -output-file=${FILE%%.*}.pdf $FILE rm $FILE exit 0;
Trace!

Trace!

 

pdftk

pdftk

 

Head + Tail

Head + Tail

 

Supply with Arguments!

Supply with Arguments!