Sunday, June 24

code.p1k3.com

Here’s code.p1k3.com, which is (provisionally) where I’m planning to host my own projects from here on out. This was precipitated by the Microsoft-eating-GitHub thing, but now that I have it feels like something I should have set up a while ago.

For the moment, it’s running Gitea, a sort of GitHub-lite in terms of interface, which is written in Go and distributed as a single binary. This feels like a good piece of software in many ways, although some of the decisions to straightforwardly copy GitHub features feel kind of arbitrary. It’s talking to a local PostgreSQL instance, although it’s also capable of using SQLite. At the volume of traffic I’m likely to get, SQLite would probably be fine.

I decided to put Gitea in a subdirectory and write a minimal front page for the site, so as to avoid locking myself into one piece of third-party tooling. I’ll experiment with other ways to view the repositories stored there, and probably with other version control systems, like the SQLite-backed Fossil.

code.p1k3.com is a $5/month DigitalOcean droplet with a gig of memory and 25 gigs of storage, running Debian 9.4.

I’m using Nginx to serve the front page, and as a reverse proxy for the Gitea installation, with the following configuration:

server {
  root /var/www/html;

  # Add index.php to the list if you are using PHP
  index index.html index.htm index.nginx-debian.html;
  server_name code.p1k3.com; # managed by Certbot

  listen [::]:443 ssl ipv6only=on; # managed by Certbot
  listen 443 ssl; # managed by Certbot
  ssl_certificate /etc/letsencrypt/live/code.p1k3.com/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/code.p1k3.com/privkey.pem; # managed by Certbot
  include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

  location / {
    ssi on;
  }

  location /gitea/ {
    proxy_pass http://localhost:3000/;
  }
}

server {
  if ($host = code.p1k3.com) {
    return 301 https://$host$request_uri;
  } # managed by Certbot

  listen 80 ;
  listen [::]:80 ;
  server_name code.p1k3.com;
  return 404; # managed by Certbot
}

You can see source for the front page in the p1k3 repo.

I used Let’s Encrypt / Certbot to get a certificate for the site (note all the # managed by Certbot comments above). I still have not set up a cron job to renew the cert.

For copying repos over from GitHub, I used Jonas Franz’s gitea-github-migrator, with a command like the following:

gitea-github-migrator migrate-all \
    --gh-user brennen \
    --gh-token $GH_TOKEN \
    --url https://code.p1k3.com/gitea/ \
    --token $GITEA_TOKEN \
    --owner 1

On GitHub, you can get an API token under Settings / Developer Settings / Personal access tokens, and on a Gitea installation under Your Settings / Applications.

I’m not sure whether I’m going to continue mirroring existing repos to GitHub or not. In terms of discoverability, archival resilience, and continuity for anyone who has something cloned from there, it makes sense. On the other hand, it continues lending force to GitHub’s near-monopoly. Maybe I’ll just add some disclaimers to READMEs.

Fortunately, no one actually uses any of my code, so it’s all kind of academic.

The above is a pretty haphazard writeup, and it’s missing a bunch of detail about installing golang and configuring Gitea. As I refine the setup, I’ll try to document the whole thing more effectively in code, so that it can be mostly reproduced by running a script or something.

Wednesday, June 20

Dara Ann Klopfenstein — July 20, 1957 – June 13, 2018

Sunday, June 3

on the vexed subject of github

So Microsoft bought GitHub. I started to outline a whole essay here, under a different title, making various arguments about that. I got about 500 words in before deleting it for being terrible writing.

Here’s the gist of the opinionating without the supporting rhetoric:

  1. This is bad and should probably be stopped (it won’t be).

  2. Microsoft are still bad even though it’s very much out of fashion to believe so.

  3. The real problem is that GitHub itself is bad and functions as such a lobster trap for open code, making the whole ecosystem more vulnerable to capture.

The real real problem is that capitalism is bad.

I was just reading about another acquisition: Bayer is buying Monsanto, to the tune of $63 billion. This is bad and should probably be stopped (it won’t be).

Microsoft made a convenient figure to cast as a villain for the computing counterculture of the 90s and early 2000s, but that’s not why they’re bad. Monsanto make a convenient villain for agricultural hippies and people who construe Whole Foods style luxury consumption as a moral good, but that’s not why they’re bad.

Both are bad because massive accumulations of unaccountable power are unhealthy, and we live in a time of escalating inequality and deteriorating governance.

I don’t know what to do about any of that.

GitHub itself is, in some sense, the product of what we could call design externalities in Git. Git’s model is distributed, sure, but it leaves the plumbing up to its users. Meanwhile, hub-and-spokes development models work pretty well for most projects, and features like issue tracking, friendly publishing, and code review are really useful. So is the discoverability of having one place to search, a unified namespace of users, and so on and so forth.

That there aren’t well-defined mechanisms for issues, code review, and other metadata to be stored and transmitted with code history is understandable from the perspective of a thing described as “the stupid content tracker”, but it’s also a giant vulnerability to the kinds of services centralizing SaaS providers are good at offering.

GitHub has solved a lot of hard problems, and solved them pretty well from the perspectives of interface, usability, and presentation. A lot of the stuff that’s missing from core Git is intrinsically difficult, and it’s more difficult to solve in a distributed way. That’s true even if your incentives aren’t to, as a friend recently put it, turn git back into svn.

Of course, if GitHub were a foundation or a cooperative with a clearly defined public mission instead of a highly successful financial engineering scheme built on the slow enclosure of the commons (i.e., a technology business in 2018), I’d probably applaud it the way I do something like archive.org. It’s not like there’s not considerable social benefit to its archival / publishing / communication functions.

(Even if, in practice, much of that social benefit is leveraged towards bootstrapping other financial engineering schemes so that assholes can get rich building the panopticon, because software is also bad and should be stopped.)

Anyway, here we are. I’m not doing anything about it this week, other than mulling some options, but within a couple of weeks is probably the right time to move all of the canonical hosting for my personal projects to a system I control. It’s been on my mind every now and then for years.

That part’s straightforward — there’s nothing I maintain on my own time that has a development team, or for that matter any users to speak of. Something like Gitea has more features than I need for things like the source code to this blog or a .vimrc that I occasionally link to in IRC. I’ll try to do an extremely boring writeup when I decide what I’m doing.

There’s a much bigger meta-game here, though, than just where some .git directories are stashed. That’s the part I’ll be watching with interest.

Saturday, June 2

a refrain

AM/FM radio is a pretty remarkable thing.

I suppose this has been obscured by the way that talk radio has played a starring role in decades of America’s political drift towards the authoritarian right, and also by the homogeneity of commercial music programming on FM. All the same, here’s a massively deployed analog technology that covers most of the world and remains compatible with decades-old hardware. There is, at this writing, hardly a house or car in the United States that can’t tune in radio stations. I’m listening to the news right now on a handheld radio that was purchased the day I was born.

The news is bad, but the radio still works about as well as it ever has.

Friday, June 1

notes from nowhere, somewhat after midnight

“We’re nowhere”, characters on The West Wing have a habit of saying as they reach a standstill in the middle of some intractable debate about policy or legislation. This is basically how I have been feeling lately.

It’s late. I should be asleep. I’ve been trying to work, but it hasn’t been working. My girlfriend’s out of town, facing down a family tragedy; I am feeling especially powerless to help. I came home for a couple of days to do things like pay the rent and beat the lawn back into submission and get a van running and reassure the cat that we hadn’t entirely abandoned him.

At some point tonight the silence started to get to me and the cat both so we watched some TV:

An early first-season episode of Star Trek: The Next Generation that was so bad I became fascinated by it — you forget how stilted and kind of foundering that show could be in the beginning, how much it could still feel like the original show at its worst. Then the first episode of sense8, a show I kind of wanted to hate immediately, and then wanted to like, and then wished didn’t seem like it was going to be so animated by violence because a lot of the other things that animate it are way more interesting.

Anyway I’m eating too many tic tacs and trying to write.

The first crop of radishes came up thick in my garden; I picked half today and will get the rest soon. The chard that wintered over is threatening to bolt, but I think I’m going to let it go. It feels like anything that hardy probably deserves a chance to go to seed, and maybe I can plant the seeds for a fall crop.

The tree & grass pollen is unescapable. You can see it in the air, there’s a thickening film on all the windshields. My eyes are burning constantly, sometimes I can hardly keep them open. I can’t breathe for shit. I’ve got to go to an allergist and plead for some kind of intervention. Of the things I never guessed about living past my early 30s, that I’d be wrecked for entire seasons on end by ambient plant sex definitely makes the list of disappointments. It’s not quite as bad as fully realizing the mortality of everyone and everything I love, but I might put it roughly on a level with the awareness that computers are actually a terrifying existential threat in terms of its overall impact on my mental health.

I found myself searching the commercial internet for facemasks capable of filtering pollen earlier today. That can’t be an actual product category, right? Just a filter mask you wear for like half the year? No way. Even if it were a thing, I can barely stand to put one of those things on for fifteen minutes when I’m dealing with solvents or, as recently, shoveling packrat shit out of a derelict shed in the woods in New Mexico. I’m probably not going to become full-time face mask guy.

The town turned on the irrigation ditch again, maybe for the duration this time. It was running muddy and full of leaves yesterday; I pulled a bunch of crap out with a rake. Today it was moving fast and clear.

I just remembered that they found a body in the creek just around the corner earlier today. (Yesterday now.) I don’t know anything about it except the guy was younger than me. I hope to God it doesn’t turn out to be anybody I know.