Setting up my personal site for IndieWeb…

Bannon’s Anticipated War

David Kaiser in Time:

During the 1990s, two amateur historians, Neil Howe and the late William Strauss, developed a new theory of American history in two books, Generations: the History of America’s Future (1991), and The Fourth Turning: An American Prophecy (1997). They identified an 80-year cycle in American history, punctuated by great crises that destroyed an old order and created a new one.

The great crises identified by Strauss and Howe included the era of the American Revolution and the Constitution (1774-1794); the Civil War and its immediate aftermath (1860-68); and the Depression and the Second World War (1929-45). Doing the math, they predicted another great crisis sometime in the first 15 years of the 21st century.

On discussing the Howe and Strauss theory with Stephen Bannon:

More than once during our interview, [Bannon] pointed out that each of the three preceding crises had involved a great war, and those conflicts had increased in scope from the American Revolution through the Civil War to the Second World War. He expected a new and even bigger war as part of the current crisis, and he did not seem at all fazed by the prospect.

MLK on White Moderates

Excert from MLK’s “Letter from a Birmingham Jail”:

I must make two honest confessions to you, my Christian and Jewish brothers. First, I must confess that over the past few years I have been gravely disappointed with the white moderate. I have almost reached the regrettable conclusion that the Negro’s great stumbling block in his stride toward freedom is not the White Citizen’s Counciler or the Ku Klux Klanner, but the white moderate, who is more devoted to “order” than to justice; who prefers a negative peace which is the absence of tension to a positive peace which is the presence of justice; who constantly says: “I agree with you in the goal you seek, but I cannot agree with your methods of direct action”; who paternalistically believes he can set the timetable for another man’s freedom; who lives by a mythical concept of time and who constantly advises the Negro to wait for a “more convenient season.” Shallow understanding from people of good will is more frustrating than absolute misunderstanding from people of ill will. Lukewarm acceptance is much more bewildering than outright rejection.

Better WordPress Management through Fabric

One of my goals in setting up a WordPress site was to automate the deployment, configuration, and maintentance. More specifically, I wanted the following:

  • Provider intependence. I should be albe to easily move my site to another hosting provider.
  • Automanted restore. I couldn’t be in a posistion where restoring from backup meant manually tapping in SQL load statements.

There’s more I want to do long-term, but that’s the bare minimum. The easiest way I found was Fabric. Fabric has a low barrier to entry because it is straigtforwardly build on top of Python functions and the commands on the target machine.

If you need to run apt-get -y install mysql-server on the target host, the Fabric call for that is:

run('apt-get -y install mysql-server')

To make the command available outside the script (e.g., from the command line), just add it in a function:

def install_msql():
    run('apt-get -y install mysql-server')

Then from the shell you can run

$ fab install_mysql

and you computer will connect to the sever and run the apt-get call above.

There’s a little bit more to it in getting your hosts, user, and paswords or keys set up, but it’s all pretty straightforward. It works over SSH so there’s no agent to install on the server.

All your functions can be parameterized in pretty obvious ways. Your backup function might look like

def backup(dbname, dbuser):
    run('mysqldump -u {0} {1} > $HOME/{1}.sql'.format(dbuser, dbname))

There are additional commands to upload and download files, to sync a directory, and other utilities.

There are drawbacks. One is that when I say “obvious,” I mean “obvious if you know Python.” It helps if you’re familiar with installing Python packages and some basic syntax.

Another drawback is the lack of idempotence. I can run apt-get -y install mysql-server multiple times without consequence. But if I run the WordPress cli, wp core install installs wordpress the first time I call it. If I call it again (after the files are already there), it throws an error.

I can live with this for now. I really want the initial setup, which always starts with a clean slate. Extending it modify an existing installation can wait for another day.