Friday, June 2, 2017

Batman v. Superman / Captain America: Civil War

It's been a few years since these films came out, so hopefully that's enough time for DC or Marvel leaning emotions to have died down to have an honest discussion of these films.

Or not.

No matter, I'm a person (I know, quite difficult to believe), and I have an opinion. But first, some background.

I love comics. Always have. My "golden age" was the 70's, when it wasn't unusual to see Superman and Spiderman teaming up in a "super comic". Okay, that was a bit unusual, but it was a very cool time. Superman was always my favourite; the idea that a man of unlimited power could maintain his moral compass despite the world was always very comforting to me. I don't think I'm alone in this, though many would consider this attitude naive (particularly the folks who cherish Batman above all else).

And I loved all the comics, particularly the sci-fi leaning ones. Typical kid, right?

In my opinion there are three films that are responsible for the quality of superhero films we see today:

1. Superman (1978)

Christopher Reeve's earnest Clark/Superman was a revelation. He should have won a damned Oscar for this movie, particularly in the scene when he's about to reveal himself to Lois Lane in her apartment. Goose. Bumps. And one of John Williams' best scores.

2. Batman (1989)

A modern, darker, take on Batman. Notable for Tim Burton's typically stylish set pieces, this movie helped elevate the superhero movie to highish art. Danny Elfman's soundtrack for this movie was as iconic as Williams' score for Superman, and is often used for movie trailers today.

3. Iron Man (2008)

We go a long time (nearly 20 years) before getting to this film. Sure there were other superhero movies in the meantime (X-Men, Spiderman etc), and while they were good they weren't particularly memorable. Iron Man changed that. Jon Favreau's no-nonsense direction elevated superhero movies to the real world, and launched Marvel's more successful stream of films. Perfect casting, tight direction, flawless (and believable) effects work, this movie became the template for superhero movies to come.


One thing virtually every superhero franchise suffers from is "bad guy overload". First movie, okay. One bad guy, lots of emotional tension, good guy wins. Barely. By the 2nd or 3rd films, most of them start to get bogged down in antagonists, and the films suffer for it. How can you create dramatic tension when there are five bad guys to beat down? You can't.

This is where we get to the two films that are our subject today.

Captain America: Civil War

The Russo brothers do a capable job with direction; the movie is reasonably tight, and it has some decent dramatic moments. This film tries very hard to be politically relevant, and mostly succeeds. Where it falls down is in finding it's tone.

The battle scene at the airport was a major set-piece for the film, and the very title demanded this scene be present. Unfortunately, tonally this fight scene does not fit in the movie. It's a big, funny, fun, action scene. One of the best, to be honest. But it doesn't fit the damned movie.

The movie's story has a very strong sense of political intrigue and dread, and having that big, funny scene right in the middle did the movie a disservice. Perhaps Marvel would have been better off calling this something else and saving "Civil War" for something down the road.

Lots of people loved this movie, and consider it head & shoulders above Batman v. Superman. I'm not one of them. I think this movie suffered from a traditional Hollywood problem: Too many fingers in the pie. Confusing, unsatisfying, disjointed, this movie had a lot of problems. The characters were almost cliches of themselves. Instead of subtlety we get speeches. Instead of that sense of dread that's required for any dramatic tension, we get...boredom. Yay, they broke into the secret soviet bunker that contained all the bad guys that were going to destroy the world...oh wait, they're dead already, so no worries. But geez, one of the good guys killed another good guys parents when he was a mind-controlled pawn, so let's have a fight.

Didn't buy it. It was not convincing, and it robbed the film of any hope of a dramatic ending. (This was the same plot device that helped ruin Star Trek: Nemesis. They make a big point out of "if we can only get out of the nebula, half of Starfleet is there waiting for us." That sets the audiences expectation up for something. What they got was the Enterprise and two or three Romulan ships dancing around the bad guy. It was a let down of epic proportions, especially when Deep Space 9 was making massive, epic space battles...on TV.)

Batman v. Superman

Zack Snyder is a capable director. Visually, he's brilliant, and we see this a lot in Hollywood. Going beyond the visual to tell a captivating story, that's tougher, and I must admit that Zack is getting better at it.

Man of Steel was a damn good film. The acting was strong, and it was played very realistically, considering the subject matter. Batman v. Superman was almost more of a Batman movie with a cameo by Superman, but I can see why they needed to do that; we had Superman's introduction, and we needed to be introduced to Ben Affleck's Batman to establish his motivations.

Tonally, the film is at least consistent. A sense of doom pervades the film and doesn't let up. Every single scene builds towards the tragic finale. One fortunate aspect of this film is it's not overloaded with characters, particularly bad guys. Yes there are two "big baddies", Luthor and his creation, but they make sense and they're tied together.

And the performances? Spectacular. Jesse Eisenberg, who I could not have cared less for before this movie, turns in the darkest, most sinister, believable, psychopathic Lex Luthor that the screen has seen. He is genuinely creepy, and wholly believable. "Lex Luthor as Tech Titan" made for a pithy catchphrase, but Jesse's performance elevated it. Much to my surprise!

Affleck I must say is my new favourite Batman. Love him or hate him, his performance as Bruce Wayne was believable and tragic in ways Christian Bales' take never was (and he was damned good).

Gal Gadot as Wonder Woman was another revelation. Certainly she has the physical side of things down pat; the wonder was her nuanced performance as Diana. Smart, funny, powerful, she promises to make the standalone Wonder Woman movie something special.

Was the movie perfect? Nope. Pacing was scattershot, it needed to be quite a bit tighter. Visually it was a bit dark; it looks like Zack took the "darker turn for our heroes" idea a little too literally. Suitable for a Batman movie, perhaps, but not one that features the trifecta of Batman, Superman and Wonder Woman.

Having said that, overall I personally found BvS much more entertaining than CA:CW. Much of that can certainly be traced to my childhood affection for Superman, but you know what? I loved Iron Man growing up too. Civil War was a mess. BvS was also a mess, but less so, and you actually felt that sense of dread that CW was missing.

Anyway, my two thoughts on a couple of movies that nobody watches anymore. So there.

Thursday, April 4, 2013

Setting up MariaDB Galera Cluster from Scratch

Okay, this one is a little fun for the techie crowd out there. Nobody can say this blog isn't eclectic at least.

MariaDB is the new database program from the folks who created MySQL, arguably the most popular database on the planet. It was created when Oracle gained control of MySQL because, well, Oracle. Galera is a multi-master "live" database that sits on top of MariaDB. The instructions on the web for installing Galera that I've been able to find are woefully inadequate, and presume a certain level of "already installed and configured".

This instruction set is designed to walk through the install procedure from start to end. Text written in courier is meant to be typed in the command line.

You're going to want to set up three servers to get this going (this is where VMware is very handy).

1. Install CentOS. I used this image:

But you should go to and pick the proper mirror.
During installation, since this is a net install, use an appropriate location for the url:

When prompted for the type of installation, select "Basic Server". Do NOT select "Database Server" or anything else that might install the MySQL database...that will cause problems. Trust me on this.

2. Create repo files for MariaDB

As root: nano /etc/yum.repos.d/MariaDB.repo
name = MariaDB
baseurl =

rpm --import

3. Create repo files for Percona
nano /etc/yum.repos.d/Percona.repo

name = CentOS $releasever - Percona
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-percona
gpgcheck = 1

wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-percona

4. Install Packages
yum install MariaDB-Galera-server galera MariaDB-client nc xtrabackup 

5. Create my.cnf
Below are the defaults that are required to successfully start the cluster.
nano /etc/my.cnf

# this has to be specified for xtrabackup to work
wsrep_provider_options="gcache.size=32G; gcache.page_siz=1G"
# Address of first server started in cluster;
# comment this line out in my.cnf of first server
# This is just an informational string, just make sure
# it matches on all clustered machines
# This is the address of the local machine
# This is just an informational string
# to describe the local machine

Replace <user> and <password> with the appropriate username and password. When configuring the first node, be sure to set up the appropriate user profile and access permissions. After you've set up the first node, the other nodes get the security information automatically. How cool is that? (Be warned: this bit grants access to the database from any machine on the network...replace % with the IP address of an appropriate machine if you don't want that!)
Sign into the local MariaDB:
mysql -u rootCREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';

6. Disable the Firewall
Not the best solution, but the cluster seems to use more than just port 4567. Haven't quite worked this one out yet. Suggestions?
service iptables stop chkconfig iptables off
7. Edit script on all nodes to prevent cluster from erroring out on startup


nano /usr/bin/wsrep_sst_commonReplace
echo "WSREP_SST: $* ($tst)" >>/dev/stderrWith
echo "WSREP_SST: $* ($tst)" >&2
8. Start the Server

For all nodes, start the server as the mysql user: su mysql - 
Don't forget the - at the end! That forces the proper environment. 
First server: mysqld --wsrep_cluster_address=gcomm://
As long as my.cnf is correct (wsrep_cluster_address variable),
you can start other machines with: mysqld

A couple of notes:

Set up the first server following these instructions, get it working, then set up each server in turn, following 1 through 8 again, but making the appropriate mods for each.

Start the first server, let it get to "waiting for connections", then start the other servers.
If you shut down the first server for any reason, when you start it up you must use this:
mysqld --wsrep_cluster_address=gcomm://address_of_another_server

Or you're pooched and will have to shut them all down and start the boot sequence from scratch. Yeah, I made that mistake a few times.

That's it! Kind of. I may have glossed over a couple of points. As I discover problems with these instructions I'll update the post. 

Last, but certainly not least, I can't take credit for these instructions beyond typing them here. Credit goes to John Flaskay, my resident expert-in-everything-linux/security/tcp/etc!

Friday, February 22, 2013

Using a Raspberry Pi as Digital Signage

I developed a digital signage application for my employer some time ago, but we ended up using Mac Mini's at the time. With the advent of the Raspberry Pi computer I thought it might make a good candidate for DS, but I had a heck of a time when it first came out getting any kind of movie playlist working.

I tried VLC, some other media players, trying to find a way to make the built in omxplayer play a playlist, nothing. Nada. Nothing worked. I could not figure out how to make an unattended digital signage device.

So I gave up. For a couple months.

When I decided to revisit the issue, a little research showed that nobody had really solved the playlist issue, so I thought I'd try to find another way around it. And I did.

It was always easy enough to just have a script that plays videos in sequence using omxplayer, however this solution wasn't quite perfect because the stream would have a 1 second pause that would show the desktop while it switched videos. The solution turned out to be simply turning on the screen saver. May sound easy, but it took me a while to figure it out!

So other than a slight pause between videos, this solution works perfectly. Here's the steps to get it going:

WARNING! If you do this, the screen saver will kick in every 1 second of idle time, even if you move the mouse. Make sure you have SSH enabled so you can remote into the system to disable this later if you need to!

1. Set up Raspbian on your Pi device according to their instructions.
2. Make sure you're signed on as pi, not root, then from a command line enter:
sudo apt-get install x11-xserver-utils
mkdir /home/pi/digitalsignage
mkdir /home/pi/digitalsignage/movies
nano /home/pi/digitalsignage/

Here I'm using a python script to use the X11 xset command to turn the screen saver on:

import os,sys,time

def SetScreensaver():
    time.sleep(15) # wait for the system to finish booting
    for x in range(0,5): 

        # try turning it on once every minute for the next 5 
        # minutes just in case!
        os.system('xset -display :0.0 s 1 60 -dpms')

        # The -dpms turns the power save option off
if __name__ == '__main__':

Press CTRL-O [ENTER] and CTRL-X to save and exit.

Then we create the player module:
nano /home/pi/digitalsignage/

Enter this text:
import os,sys,time

def RunPlaylist():
    while 1:
        path    =    '/home/pi/digitalsignage/current.m3u' 

        file    =    open(path,'r')
        files   =    file.readlines()
        for file in files:
            filename = file.strip()
            if '.mp4' in filename:
                os.system('/usr/bin/omxplayer /home/pi/digitalsignage/movies/%s>/dev/null' % filename)

if __name__ == '__main__':

Press CTRL-O [Enter] then CTRL-X to save and exit again.

Next you have to copy your MP4 video files to the /home/pi/digitalsignage/movies folder.
Once done, create the playlist. Let's say for this example we have "video1.mp4" and "weather.mp4", and you've uploaded them to the /home/pi/digitalsignage/movies folder. Type:

nano /home/pi/digitalsignage/current.m3u

Enter the following:

Press CTRL-O [Enter] then CTRL-X to save and exit.

Finally, modify the startup:

crontab -e

And add these two lines to the bottom:

@reboot /usr/bin/python /home/pi/digitalsignage/
@reboot /usr/bin/python /home/pi/digitalsignage/

Press CTRL-O [Enter] then CTRL-X to save and exit.

Then reboot:

sudo shutdown -r now

That's it! When your Pi reboots, it will come up with a full video playlist player and start automatically.

Now, I've actually wrapped some other functionality around it for my employer, such as having a web-based management program that will load new videos to the Pi then restart the playlist, that sort of thing, but if you're looking to set up the playlist functionality this should hopefully help!

Monday, December 31, 2012


This one is so easy it's stupid. It just takes a little prep.

6 chicken breasts
1 bag large shrimp (cooked)
1 green pepper
1 red pepper
1/2 purple onion
1 package thick sliced mushrooms (or slice your own)
Olive oil to taste
Soy sauce to taste
1 tablespoon ground oregano

Cut the chicken into pieces, marinate in olive oil, soy sauce and oregano. Put in the fridge for at least three hours. Do the same thing for the frozen shrimp, though you might want to thaw them in cold water for half an hour first.

Marinate the skewers! I forgot is part and ended up with slightly smoked kabobs :)

Cut the veggies into whatever size pieces you like, then marinate them as well.

Throw some lard or other oil into a wok, and cook the chicken pieces until mostly done.

Assemble the skewers! There's enough veggies to alternate meat, veg, meat, veg, etc...

Toss on the BBQ for 10 to 15 minutes. Depending on the size of your BBQ this might two batches...

We were very, very surprised at how delicious these were. 5 stars.

Wednesday, December 19, 2012

Low Carb Cheesecake

3 packages (1 and 1/2 lbs) cream cheese (room temperature)
4 eggs (preferably room temperature)
1 and 1/2 teaspoon vanilla
1 and 1/2 teaspoon lemon juice
1 and 1/3 cups Splenda
1/4 cup sour cream

1 cup almond meal
2 Tablespoon melted butter
2 Tablespoon sugar equivalent in artificial sweetener

Heat oven to 375 F.

Combine ingredients for crust, and press into the bottom of a springform pan. Bake for 8 to 10 minutes, until fragrant and beginning to brown.

Raise oven heat to 400 F.

Put cream cheese in mixing bowl, and beat until fluffy. Add other ingredients, scraping the bowl and beaters each time (this is very important), fully incorporating each ingredient. When all ingredients are combined, scrape one more time, beat one more minute, and pour mixture into pan over crust.

Put the cheesecake on a sheet pan in case of drippage. After putting the cheesecake in the oven at 400 F, turn the oven down to 200 F. Bake for 60 to 90 minutes, checking often after an hour. When the cake is firm to touch but slightly soft in the center, or the center reaches 155 F, remove from oven.

Tuesday, December 18, 2012

Lets kill cancer!

Say what you will about this appearing on The 600 Club, but the science behind it is solid. How do you kill cancer? STOP EATING CARBS! I'm so sick (pun intended) of seeing friends, family and acquaintances suffer from this modern plague. The drug companies can kiss my ars.