Guilty Pleasure
#! /bin/zsh
USAGE="usage: ${0:t} hostname\n Removes hostname host key from ssh known_hosts"
if [[ $# -ne 1 || $1 == -* ]]; then
echo $USAGE
exit
fi
host=$1
sed -i~ -e "/^$host/d" "$HOME/.ssh/known_hosts"
#! /bin/zsh
USAGE="usage: ${0:t} hostname\n Removes hostname host key from ssh known_hosts"
if [[ $# -ne 1 || $1 == -* ]]; then
echo $USAGE
exit
fi
host=$1
sed -i~ -e "/^$host/d" "$HOME/.ssh/known_hosts"
Thursday, 6 Mar 2008—So. Adobe Flash Player on the >OLPC XO
is Essential. And,
although it’s easy enough to
install, the major problem is
that it doesn’t use the Sugar mouse cursors. It uses the default X
cursors instead, which are practically microscopic on the fancy
200dpi display.
If you’re having that problem, try the following (in the Terminal activity).
$ su # cd /usr/share/icons/default # ln -s ../sugar/cursors .
Hopefully, that will make any app that uses
libXcursor
use the big Sugar cursors by default.
Monday, 5 Nov 2007—At ISRI, we periodically have to
deliver some kind of file, be they software, reports, or just blobs
of data.
Handing a CD-ROM to FedFex is probably the default method—and is
required by some projects—but it’s always bugged me to do
something that annoying and slow when we have the Internet, like,
right there. Isn’t that what it’s for?
Email is a possibility, except for being broken; you never know what
crazy filter policy or just stupid Windows “enhancement” your code
is going to have to penetrate to get to it’s intended recipient.
There are fancy services now that make fetching some big file over
the web look a lot like email to the various parties. What do you
think a client that requires a CD-ROM, with a double-wrapper, baring
appropriate notices such as “Official Use Only” and “To be opened by
addressee only” is going to say about such a service? Yeah, me too.
So as expected, we’re back to our home web server; at least there we
have baked-in encryption and authentication. First pass: Use our
main web server. Put files somewhere with a .htaccess requiring a
password and HTTPS. It’s not only too heavy, but unmaintainable.
And you have to remember to remove everything after the recipient
has grabbed the files. Second pass: Look at various ad hoc web
servers. None of them are really that ad hoc; they usually serve
entire directories and are intended for more than single-shot.
Third pass: https-file-dist.
[~]0% ./https-file-dist -h
usage: https-file-dist [options] files...
Network options:
-a, --address SPEC Address and port to bind.
(default=0.0.0.0:8443)
Authentication options:
-u, --username USER Require username
-p, --password PASS Require password
--realm REALM Name of realm to send with Basic Auth req
(default=dexter.isri.unlv.edu)
Common options:
-h, -?, --help Show this message.
-v, --verbose [N] Set log level (0(fatal)<=N<=5(debug))
-V, --version Print program version and exit
It can:
^COriginally, I had a feature that it would automatically die after
every file was successfully fetched, but I realized that it was just
asking for trouble. Just sit on the phone and watch the log while
your other party fetches the files, then kill it. Redirect the log
to a file and you have a kind of pseudo-accounting even.
l () {
if [[ $# -eq 1 && -f $1 ]]; then
case $1 in
*gz) zmore $1 ;;
*) less $1 ;;
esac
else
ls -CFL $*
fi
}