Another way to configure the bash shell so that it doesn’t alert you to new email is to set the MAILCHECK environment variable to zero or a negative number, like this:
/home/micha/.bashrc:
export MAILCHECK=0
From the bash(1) manpage:
Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
So this afternoon I see a number of new stop signs near where my mom lives in Miami Beach. These weren’t regular stop signs, but more like what I would call “harassing” stop signs. These signs were not put in a normal intersection. No, they were put on all sides of a tee intersection, where a little side road meets the main road. There is absolutely no need for a stop sign there at all, to say nothing of an all-way stop situation like they have there now. I assume they’re there in some kind of attempt to slow the traffic, or maybe to discourage outsiders from using the road. Who knows. Whatever.
But now that I’m thinking about stop signs, I think it’s even dumber than it seems. What the hell are stop signs for anyway? I am totally not a stop sign kind of guy. I roll through those fuckers on a daily basis if nobody’s coming the other way. As a reasonable human with half a brain should do. There is absolutely no need for a person with higher than brussel sprout IQ to come to a complete stop if there are no other cars on the roads. Duh. But no, that kind of common sense thinking can get you a ticket or worse around here. Bah.
See, what I would do, if I were boss of the world, would be to use yield signs. You hardly ever see those things, and I think it’s a shame because all stop signs can be replaced by yield signs. It’s very simple. There you go. If you’re in a really really really tricky spot you could use a traffic circle, but that should be discouraged as much as possible in the interest of simplicity.
This would clearly define the responsibilities of the drivers who use the intersection, and assign guilt in the case of an accident. Responsibility, people. We need to get out of the uncle-sam-is-my-mommy-and-will-protect-us-from-our-stupid-selves mindset and start taking ownership of how we interact with eachother in our society. We are not mentally challenged children who need to be taken by the hand and walked to the bus stop by Big Brother. I think that everyone deserves to be given enough rope to hang themselves. Without the scope of free will to exercise your responsibility what kind of citizens can we ever be? I’ll tell you: we’ll be the kind who ask not what we can do for our country, but what our country can do for us.
Here is a shellscript I wrote to handle my master password file. It uses PGP for encryption.
Features:
- You can use it just like you would use vipw(8) or visudo(8).
- The data is never on the disk in an unencrypted state. There are no temporary files or anything like that containing plaintext.
- Can (optionally) make full use of RCS(1) for version control.
You can download the script here.
If you are in the army and you use the Army Knowlege Online webmail, and you want to use fetchmail to automatically download it from IMAP, then this is what you want to do:
1. Create a directory to hold the AKO SSL certificate:
mkdir ~/.certs
2. Download the certificate:
openssl s_client -connect imap.us.army.mil:993 \
|perl -ne '{print; /-END CERTIFICATE-/ && exit}' \
|sed -ne '/-BEGIN CERTIFICATE-/,$p' \
> ~/.certs/imap.us.army.mil.pem
The cert file (~/.certs/imap.us.army.mil.pem) should look something like this:
-----BEGIN CERTIFICATE-----
MIIEDDCCA3WgAwIBAgIDAiuQMA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNVBAYTAlVT
MRgwFgYDVQQKEw9VLlMuIEdvdmVybm1lbnQxDDAKBgNVBAsTA0RvRDEMMAoGA1UE
CxMDUEtJMRkwFwYDVQQDExBET0QgQ0xBU1MgMyBDQS03MB4XDTA1MDcyNjE1MjQx
M1oXDTA4MDcyNjE1MjQxM1owgZgxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9VLlMu
IEdvdmVybm1lbnQxDDAKBgNVBAsTA1BLSTEMMAoGA1UECxMDRG9EMQwwCgYDVQQL
EwNVU0ExGTAXBgNVBAMTEGltYXAudXMuYXJteS5taWwxKjAoBgkqhkiG9w0BCQEW
G3JheW1vbmQud2lsc29uMkB1cy5hcm15Lm1pbDCBnzANBgkqhkiG9w0BAQEFAAOB
jQAwgYkCgYEA7vZE/HJD1x0E3Sk09DDZwAmGmzAo+ZUdMFGKYYI+cM+JYp6nIYIW
Y0DHSQqLEsWMgYS4VkoQgT98UNX8yrvUZB61JUTTgZyMuqxKrEzESZKilhsl2Tf4
+193c2enhOymKGV7HPdNT9Witre7G8N+ZPPk4EOjryuszOnefdJ3FmECAwEAAaOC
AZswggGXMB8GA1UdIwQYMBaAFALFH0MRc2AyNz7mR4Yp3iG2cmYjMB0GA1UdDgQW
BBQQ1f8KwwPnkxN0DK5stJnQOQa5szAOBgNVHQ8BAf8EBAMCBaAwgawGA1UdHwSB
pDCBoTCBnqCBm6CBmIaBlSBsZGFwOi8vZHMtMy5jM3BraS5jaGFtYi5kaXNhLm1p
bC9jbiUzZERPRCUyMENMQVNTJTIwMyUyMENBLTclMmNvdSUzZFBLSSUyY291JTNk
RG9EJTJjbyUzZFUuUy4lMjBHb3Zlcm5tZW50JTJjYyUzZFVTP2NlcnRpZmljYXRl
cmV2b2NhdGlvbmxpc3Q7YmluYXJ5MBYGA1UdIAQPMA0wCwYJYIZIAWUCAQsFMH4G
A1UdEgR3MHWGc2xkYXA6Ly9kcy0zLmMzcGtpLmNoYW1iLmRpc2EubWlsL2NuJTNk
RE9EJTIwQ0xBU1MlMjAzJTIwQ0EtNyUyY291JTNkUEtJJTJjb3UlM2REb0QlMmNv
JTNkVS5TLiUyMEdvdmVybm1lbnQlMmNjJTNkVVMwDQYJKoZIhvcNAQEFBQADgYEA
haIiC/Adgm3gmL822RqvsJX4VGP0eX4MPKRdrzXh13eXavzwvVhwZjU7qZo7t6gC
NVaHCltTK5g1+zF0Nkhn+Coa70uJumYV1ay0KxP8PeiVWz6hz6URnZz3hGBKymse
SCR7iENgK+lqE2Bm4YYPimOKl+zTGVr7rX2esXyepvQ=
-----END CERTIFICATE-----
3. Edit your fetchmail configuration file (~/.fetchmailrc) to look something like this (for the fictional user ‘beetle.s.bailey@us.army.mil’ with password ‘sargesux’):
poll imap.us.army.mil
port 993
protocol imap
username "beetle.s.bailey"
password "sargesux"
sslfingerprint "4C:64:D0:DD:DC:90:E6:93:E4:79:65:75:B6:4B:DB:E5"
sslcertpath "$HOME/.certs"
mda procmail
keep
ssl
The sslfingerprint option allows you to manually verify the authenticity of the SSL cert. You need to do this because AKO uses government self-signed certificates. As a workaround you can get the fingerprint using fetchmail with the -v option.
Be aware that this is a potential security issue if there is a “man in the middle” pretending to be the AKO imap server. Such an evesdropper could then set up an IMAP server to collect your login and password info. A sophisticated attacker could even relay your connection to the real AKO server and let you read your mail, etc. so you would not even necessarily know that any shenanigans were going on.
Also this configuration is set up to use procmail for the local mail delivery.
See: fetchmail(1)
This link is a pretty good reference for setting tabs and indentation in vim. I find the :retab command especially useful when I’m editing a file that has mixed tabs and spaces in it and I want to clean it up and have only spaces for indentation.
In this case doing a find/replace substitution for the tabs (like :%s/^I/ /g, for example) doesn’t really do what you want it to do. I mean, the whole point of having tabs is that they are not all the same width—-some of them may occupy only one character of space, while another may occupy 4 characters of space, depending on how you have your tabstops set. But :retab does it beautifully.
From the page:
After the ‘expandtab’ option is set, all the new tab characters entered will be changed to spaces. This will not affect the existing tab characters. To change all the existing tab characters to match the current tab settings, use :retab.
When you use this it’s probably a good idea to put a modeline at the top or bottom of the file to prevent those tabs from getting back in there.