Home

 

Home
Books
Resume
UlyCO
Comics
Living On Food
What's Your IP?
Coffee
Roasting

Election 2016: Things I Learned, Which I Already Knew

Ulysses, 631 words, 2016-11-25

Fuck, this sucks.

We went from the best president in my lifetime to someone who will almost certainly be the worst president in American history.

America's Racist, Who Knew?

Okay, pretty much everyone. I was still, in my naivety, shocked at the extent of it. The KKK literally did a victory march and celebration of the election results, and Trump's support didn't flag. They're already talking about rounding up and imprisoning Americans based on their race and religion, while the media talks about how we "need to give Trump a chance."

One of the more amusing things that's been happening since the election is racists on social media complaining about people calling them racist. In a way it's hopeful, they know they're bad people. They could choose to change if they wanted to, but they mostly seem to want people to stop pointing out how awful they are.

There's even been pushback against people saying that Nazis were bad people. Seriously, if this was just a novel (and not the most powerful nation on earth, with a huge nuclear arsenal) I'd snort at how ridiculous and unrealistic it was.

America's Misogynist, Who Knew?

The hatred of (so many) Americans for women is astounding. It's so endemic in this country that many American women decry feminism, as if sexual equality as a concept is a combination of laughable, horrifying, and perverse.

Unlike racism, most people don't even bother denying being misogynists. They're proud of it.

Women Face Strong Barriers To Hiring And Promotion

A competent, experienced woman ran against an incompetent, inexperienced man. And the man won. (Though, to be fair, she did win the popular vote. By a lot, over 2 million at the time of this writing.) No one can look at the election and conclude that there is no systemic bias against women in America.

Yet I see people claiming that all the time.

As an example, IT people will go on and on about how worthless IT job interviews are. (And they are.) IT interviews don't do a good job of measuring candidates' abilities to do the job. People are weeded out for arbitrary reasons. Bias is rampant, and the term "culture fit" is openly used to discriminate against people. Yet the same people who complain about the ineffectiveness of job interviews, claim that there's no bias at all against women, and the reason there are so few women in tech is that they're just not qualified.

Here are the two candidates we had in the election:

Clinton

Clinton has decades of experience, and no honest person would deny that she's extremely qualified to be president.

Trump

Trump is a blustering, insecure, irrational twit with no experience, and no honest person would say that he's qualified to be president.

He ran an extremely racist and misogynistic campaign. How racist? So racist the KKK had a celebration rally when he was elected. So racist that a week after his election (more than two months before his inaugeration) people started talking about rounding up US citizens based on race, national origin, and religion and putting them into camps.

How misogynist? He dismissed video of himself openly bragging about sexually assauting women and getting away with it as "locker room talk". (No locker room I've ever been in, but I suppose YMMV.) He appears to have only two settings for women, "She's young, pretty, and thin, so I want to fuck her" and "She's a disgusting, horrible person." And it's undeniable that a significant fraction of his voters voted for him solely because he was running against a woman.

His qualifications over Clinton? He's a rich, white male.


Simple Upload To S3 With IAM Role

Ulysses, 405 words, 2016-02-16

I needed to push files from a few ec2 instances into an s3 bucket. These weren't my systems, and I won't be around to support them in a couple of months anyway, so I wanted to do it with a simple, stand-alone script that didn't require me to install anything else on them.

You need to assign the IAM role when you first launch an instance. Fortunately the instances were set up with an IAM role already, so I just needed to make sure they had the right permissions.

An example policy that grants all access to bucket "EXAMPLE-BUCKET":

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": "arn:aws:s3:::EXAMPLE-BUCKET/*"
    }
  ]
}

The Perl script:

Normal beginning:

#!/usr/bin/perl -w
use strict;

Get file and bucket names from command line:

unless (@ARGV == 3) { die "Usage: put-into-s3 BUCKET LOCALFILE REMOTEFILE\n"; }
my($bucket, $localfile, $remotefile) = @ARGV;
unless (-f $localfile) { die "$localfile isn't an existing file\n"; }
$remotefile =~ s#^([^/])#/$1#;
my $remotehost = "$bucket.s3.amazonaws.com";
my $url = "https://$remotehost$remotefile";
my $resource = "/$bucket$remotefile";

RFC 2822 date for the HTTP header.

chomp(my $date = `/bin/date -R`);

Here's the first big bit, getting credentials from the IAM role. The first curl gets the name of the IAM role on that server, and then the second one gets the credential information. Then I pull out the pieces I want.

sub get_creds(@) {
  my $iaminfo = "http://169.254.169.254/latest/meta-data/iam/security-credentials/";
  chomp(my $role = `/usr/bin/curl -s $iaminfo`);
  my $iamurl = "$iaminfo$role";
  my $creds = `/usr/bin/curl -s $iamurl`;
  my @results = ();
  for my $key (@_) {
    if ($creds =~ /"$key" : "([^"]+)"/) {
      push(@results,$1);
    } else {
      die "no key $key found in $creds\n";
    }
  }
  return @results;
}
my($accesskeyid, $secret, $token) = get_creds('AccessKeyId','SecretAccessKey','Token');

The second big bit, hashing the signature.

open(SSL,
  "/bin/echo -n 'PUT\n\n\n$date\nx-amz-security-token:$token\n$resource' |" .
  "/usr/bin/openssl sha1 -binary -hmac $secret | /usr/bin/base64 |"
);
chomp(my $signature = <SSL>);
close SSL;

And finally, sending the upload to S3.

system(
  '/usr/bin/curl',
  '-H', "Date: ${date}",
  '-H', "Authorization: AWS ${accesskeyid}:${signature}",
  '-L',
  '-H', "content-type: ",
  '-T', $localfile,
  '-H', "x-amz-security-token: $token",
  $url
);

Thanks:

I couldn't quickly google a complete solution, but these two links helped immensely.

Upload From Bash

Get Credentials From IAM Role


Looking For Work

Ulysses, 122 words, 2015-11-10

Well, kinda.

Last Wednesday, November 4th, I was told my last day here at Real is March 31st, 2016.

So, I'm brushing off my resume, and open to offers, but not super frenzied yet.

I've updated my resume and resume page, but I still have a lot of work to do on them. It's been a long time since I needed to find a job.

I mostly program in Ruby, Perl and PHP, though I occasionally use quite a few other languages, such as Expect, JavaScript, SQL, bash, etc.

I've been running a lot of Linux servers, running a variety of server software, for a long, long time.


Sasquan

Ulysses, 44 words, 2015-08-27

Yesterday, we got back from Sasquan, the 73rd World Science Fiction Convention.

Quite a fun convention, though it was at times difficult to walk outside. The smoke from the fires was everpresent, at times faint, at times so thick it was hard to breathe.


PSA: Stretch!

Ulysses, 201 words, 2015-06-20

Monday morning, I hurt my back. My upper back, and not too badly; I've hurt it worse in the past.

It was my own fault. I tried to put a shirt on. If you're going to do such a hedonistically irresponsible thing in the morning, I suppose you have to expect the occasional pulled back or broken neck.

Having hurt my back before, I have a set of back stretches. I know that if I do them regularly, my back feels better and I'm much less likely to hurt it. I, of course, don't do them regularly. I have, however, done them all this last week, and they got my back feeling better relatively quickly.

Now, let's talk about you. You're getting older. You are, I feel it safe to say, older today than you were a year ago, and quite a bit older than you were a decade ago. So stretch. Every day. Not only does it reduce your risk of injury, it makes you feel better each day.

Also, exercise regularly and improve your diet. And stop the heroin. Not all at once; that's dangerous. It's best to taper off gradually.


 next

All material Copyright © 2006–2016 Ulysses Somers, except where otherwise noted.