Living On Food
What's Your IP?

A Few Weeks In My Pocket

Ulysses, 420 words, 2017-11-14

The GPD Pocket is a tiny, light, yet full-featured laptop. Online pictures don't do it justice, it has a ton of "Awwww!" factor when you see it in real life.

I purchased from Amazon for $600 on 2017-08-22 and it showed up on 2017-08-24.

It comes with the Windows 10 home, and there's a project and github repo to set up Ubuntu or other Linux distros on it. I have mine set up to dual-boot between Windows and Linux. The Ubuntu side has some issues but works well enough for me to type on. I've had no issues with the Windows side.

The main thing that I wanted was a laptop light enough for me to carry everywhere, that I could use to write on the bus or anywhere else. It works great for that use case. In addition, I've used it for:

The keyboard is a bit of a mixed bag. It's surprisingly good considering its size, and the key response is good. The special characters, though, are placed oddly. So straight text is fine, except for some punctuation, but coding isn't great.

It has four ports, USB, headphones, micro HDMI, and USB-C. It charges through USB-C, and the charger it came with died after about a month, while I was on vacation in Michigan. A local Best Buy, though, had a decent replacement for $25.

Another issue I had with it, after a few months, was that the screen started flickering and there was a thick white circle superimposed over the display. (Or jittering – it looked like interlaced displays used to look, on the Amiga. Flickervision.) I took the back off, removed and reseated the video cable, and it went back to normal.

It has a quad-core Intel Atom x7-Z8750 at 1.60GHz, 8 gigs of RAM, and a 128 gig SSD. Plenty of RAM, and plenty of disk space even though I'm dividing it in half for dual-boot. Compiling a kernel on it is slow, but it's spritely enough for everything else.

My final vote? I love it. There's nothing else that fits my set of requirements nearly as well. If it was destroyed, I'd order another immediately.

And that "Awwww!" factor? Twice, on the bus, people have asked me about it. That isn't normal Seattle bus behaviour…

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 has decades of experience, and no honest person would deny that she's extremely qualified to be president.


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 = "";
  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" : "([^"]+)"/) {
    } 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.

  "/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.

  '-H', "Date: ${date}",
  '-H', "Authorization: AWS ${accesskeyid}:${signature}",
  '-H', "content-type: ",
  '-T', $localfile,
  '-H', "x-amz-security-token: $token",


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.


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.


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