Thursday, July 23, 2015

Encoding a Passphrase in a Bash Script

There's an ftp server I need to access from time to time, and the password is one that was assigned to me, and so not one that is very memorable. Like 87sa!9s8op12mn or something. One solution is to put the password in a script and use that, but there are some obvious reasons that is a bad idea. A better idea is to adapt the encryption and decryption methods mentioned in this post.

First, we need to get an encrypted version of the old password:
echo  '87sa!9s8op12mn' | openssl enc -des -a -e -pass pass:MyMemorablePassword
That returns:
So now, in our script, we can simply do this:
PASSWORD=$(echo U2FsdGVkX1/ewCk0xYTJF33NCLpJ6eULDqQC60Hh3oY=  | openssl enc -des -a -d);
When that runs, it will ask us for OUR password, which it will then use to decrypt the actual password.

My First Cat Video!!

I caught our cat Lily playing with one of her favorite toys the other day: a piece of carpet fuzz. Since I happened to have my phone with me, I recorded her. I'm biased, obviously, but I think she is hilarious.

Tuesday, July 7, 2015

Frank Bruni on the "Gay Marriage" Decision

For anyone who can't understand what Justice Kennedy was going on about when he talked about the dignity denied to gay people, read Frank Bruni's piece in the New York Times.

Wednesday, July 1, 2015

Racism and the Confederate Battle Flag

Speaking as someone who grew up in the South, and who saw the Confederate battle flag damn near everywhere back then, I have to say it's damn near time it was removed, at least, from public places. But, in truth, I wonder if this isn't a distraction: Take down the flag, and then you don't have to do anything to deal with the actual problems the popularity of that flag indicate.

Having lived in the South, I can say with some certainty that a lot of people with whom the flag is popular really don't understand its true meaning. They really do think of it as a symbol of heritage and rebellion, kind of like a pirate flag. Of course, as Tim Wise argues at AlterNet, that's no excuse:
Those who defend the flag consider the black experience irrelevant, a trifle, hardly worthy of their concern. Who cares if the flag represented a government that sought to consign them to permanent servitude? Who cares if segregationists used that flag as a blatant symbol of racist defiance during the civil rights movement? Remembering the courageous heroics of one’s great-great-great-grandpappy Cooter by waving that flag or seeing it on public property is more important than black people's lived experience of it.
But if that is the real problem, then we need Southern politicians to do more than object to a symbol of racism. We need them to start objecting to racism itself and to stop their cynical exploitation of it for political gain. We need them to start understanding, as Wise says again, that "Sometimes racism isn't about vicious bigotry and hatred...". Though, of course, that may be difficult, since that might mean looking honestly at their own prejudices.

Maybe the best thing about the article, though, it is the way it mocks American exceptionalism, and ties it to American racism:
For Gohmert to claim that [after the gay marriage decision] God's protection will be withdrawn is to suggest that prior to this time we were the active recipients of that protection, that to this point God had shined his light upon America, blessing us with all good things, happy at the sight of our superior morality. And yet, for that to be true, one would have to believe that God saw nothing wrong with the enslavement of African peoples for over two hundred years, the slaughter and forced removal of indigenous peoples from their land, the invasion and theft of half of Mexico, the abuse of Chinese labor on railroads, the internment of Japanese Americans—nothing wrong with lynching or segregation. You would have to accept that God is more offended by marriage equality than any of those things, that God was essentially sanguine about formal white supremacy, and willing to extend his protective blanket over us even in the face of that, but somehow so-called "gay marriage" is a bridge too far.
I'll stop quoting there. Read the article.