jemnotesversion 2 / featuring todo or see all/search

Aug 5
Nice way of seeing a cloud of words. For example, for this page I got {{<img src=“/jemnotes.png” alt=“wordle cloud” />}}
Aug 5
Taking things to extremes when calculating the product of 1 through to 9.
# Python version.
prod = 1
for x in range(1, 10):
    prod *= x
prod
# Ruby version.
(1..9).inject :*
Jul 29
When typesetting mathematics with LaTeX, note that \mid is a vertical line with spacing as befits a binary relation, and \vert is a vertical line as an ordinary symbol. Compare: $p(x mid y)$ (with \mid); $p(x vert y)$ (with \vert).
Jan 30
Let’s say we want to remove the prefix one from a series of files. Use this:
for FILE in one* ; do mv $FILE `echo $FILE | sed 's/one//'` ; done
Or, use +rename+. Thanks to the reader who pointed out that, in Debian GNU Linux (for example), you can also use rename, as in
rename 's/^one//' one*
Much cleaner, if rename is available.