Anna Weatherup Sunday Sesh, or, How to Rotate a Video Clip Using Mac OSX (plus waterskiing)

Today Christian, Groovy (a Holden fan), Milli, scruffy little fella Matt, Patsy and Shannon came to see Anna Weatherup’s Sunday Sesh at The Beach House in Brisbane (cnr Albert and Elizabeth St, above Starbucks and McDonalds) — every week at 4pm btw!

Was a great way to spend a Sunday arvo with a few drinks (not alcoholic for me because I’m off it for 30 days!) and having a chat, Anna’s really talented and entertaining.

How does this relate to rotating a video clip on Mac OSX? I’m glad you asked.

Well, I had my cheap and cheerful digital camera with me and I took a video of the last 30 seconds of Anna cracking out Leonard Cohen’s “Hallelujah”. As you can see I have uploaded the video to Youtube for your viewing pleasure, but my plan came unstuck when I realised that I had recorded the video with my camera on end (you might call this “portrait” mode), and this meant that the video would be sideways on Youtube when it was uploaded. Not good.

I opened up iMovie HD with the plan of just rotating the video there, exporting it and uploading the clip to Youtube, job done. But no. iMovie HD as it comes with OSX 10.4 doesn’t rotate video — it only has every other effect known to man, but nothing that you actually need, like being able to rotate a clip.

My usual googling around didn’t turn up too much useful stuff at first as I found things like Apple’s Final Cut Pro and QuickTime Pro — well they cost money and I’m a tightarse so I don’t really want to be dropping cash on software just to rotate a single thirty-second video by 90 degrees. So I persevered and then I found a couple of interesting links, the first of which was an iMovie plugin called Simple Rotate. I downloaded Simple Rotate and I’m sure it’s good but I didn’t use it because I then found MPEG Streamclip, an awesome but not very intuitive thing that can export to a zillion formats and even rotates, crops, resizes and a bunch more stuffs. So I imported my QuickTime MOV (that’s what Kodak cameras save videos as) into MPEG Streamclip, then exported as an MPEG4 with AAC audio. I messed around with the cropping settings, set “rotate” to 90 degrees, clicked the “Make MP4″ button and voila! The video file was even smaller than the original so it was quicker to upload to Youtube.

Unfortunately the video I created was a little bit too narrow (because it was created from portrait mode, remember?) so Youtube stretches the clip horizontally, which sucks.

waterskiing!

But I don’t want to end this post on a bad note, so in other news, today I went waterskiing! It was with the Brisbane Waterski club where the club members will gladly take you out on the river at Jindalee and help you learn to ski, giving you tips on what you’re doing wrong and, in my case, drive the boat around in circles to come and pick you up after you stack it, again and again. It’s great fun — next week I’ll be standing up for sure. Fingers crossed.

How to Hide HTML Elements and How to Find Named SQL Server Instances With the SQL Server Browser Service

I learned some stuff the other day at work that maybe should be obvious, but it wasn’t obvious to me and so what I’m going to do is start a new blog category named “Stuff I’ve Learned”. The two things in this post could probably also be filed in another category called “Duh” but I haven’t decided yet if that is a good idea — maybe after writing this I will decide.

database administrator

Well, what have I learned? The first item was about HTML and CSS and really Javascript as well — you might call this “DHTML” but who am I to judge? The second was about SQL Server and how a client (e.g. Query Analyzer or a website) resolves a named instance of a SQL Server.

  1. You can hide a DIV element using visibility:hidden; in CSS, and then show one of the child elements of the DIV using Javascript, without modifying the visibility of the DIV. How about that!
    I have a demo HTML page that is similar to our real scenario, having two radio buttons and an image in an invisible DIV. The first radio button makes the DIV visible, which, as you would expect, shows the image that is a child element of the DIV. This is how I thought you would need to do things. The second radio button in the example page shows only the image, without showing the parent DIV element — and it still works! This was unexpected for me because surely an element shouldn’t be shown if it is inside another, invisible element? This works in Internet Explorer 6 and Firefox 2 but I haven’t tried any other browsers.
  2. We’ve been setup new SQL Servers at work and maybe to save IP addresses, or maybe to ease administration (DNS entries? Server administration overhead?) load, we are using named SQL Server instances on a single hostname (e.g. BNESQL5000\SQL5000) where BNESQL5000 is the hostname and SQL5000 is the name of the SQL Server instance on the server.

    Now the other afternoon, I could connect fine to the named instance using Query Analyzer, which I had running since that morning. Another dude at work couldn’t connect using Enterprise Manager (ergh, clicking — I’ll do it with SQL cause I’m a Real Programmer). Obviously I was connected and using the server, so it wasn’t a problem with the SQL Server instance itself — it was running fine. So I ran netstat on my PC to see which TCP port I was connected to the SQL Server on. It was port 50433 incidentally, so I said to my Enterprise Manager-using friend, “Try BNESQL5000,50433″ as your SQL hostname, which sneakily connects directly to the named instance without using its name. Well voila, my Enterprise Manager-using friend connected straight up and started hammering out database changes with his clicky mouse like a demon.

    You’re probably wondering, “Omg Glenn, tell me how this named instance and TCP port magic happens!” and that’s great because I am going to tell you. The way it happens is that when you try to connect to a named SQL Server instance your client goes “uhh, the bit before the backslash is a hostname, duhhh, but there’s a backslash so, um, that’s the name of an instance innit?” and so it connects to port 1434 (standard SQL Server port of 1433, plus one) which is where the SQL Server Browser service is listening. There, the client asks the question of “which port is named instance ‘SQL5000′ listening on?” and the SQL Browser replies with port 50433. So then the client goes “BOOYA!” and connects to port 50433 without any complaints or further ado.

    So obviously, the problem was that the SQL Browser service wasn’t running on our server, after it was rebooting or something silly. I smugly informed the DBAs what was going on and they fixed the problem in no time. All was well.

So here ends Lesson One of “Stuff I’ve Learned”, I hope it was informative and sufficiently brief! :D

The Joys of Linux and Command-Line FTP Clients

As part of my web hosting dealings I agreed to upload one of my (now ex-) clients’ sites to his new webhost. When I first offered I didn’t consider that the normal command-line FTP client (GNU FTP?) doesn’t recursively create subdirectories and stuff, so it was going to be an intensely laborious manual task of creating about fifty billion subdirectories; i.e. not possible.

As I do in these situations I unhesitatingly turned to Google, which came through with the goods in the form of lftp (lftp man page), a command-line FTP client that has a ‘mirror -R’ (reverse mirror) that mirrors your local directory to a remote site. “Oh, bomb, that’s perfect,” I thought to myself, and gleefully found that it was indeed installed on our ancient Red Hat Enterprise Linux 3 server.

Well ye olde lftp has some quirks and some foibles, at least for the young player like me. The foible I ran into was that lftp tries to make an SSL connection to the target server if it can. In my case it could indeed connect via SSL, but the SSL certificate wasn’t a “real” proper bought SSL certificate, it was a “fake” self-signed cert and lftp didn’t like that one bit. So it would connect to the remote server without complaining but then when I tried to make it do anything it would just refuse and say cd: Fatal error: SSL connect: self signed certificate.

To get around this I had to edit the config file to disable connecting via SSL. I couldn’t find a command-line option to do this so editing the config file was my only option. This involved adding the line ftp:ssl-allow false to the /etc/lftp.conf file, which probably isn’t ideal since that’s for the entire system but pfft, whatever. You can also create a user-specific config file for lftp in your home directory called ~/.lftp/rc if you don’t have full root access or you don’t want to ruin everyone else’s fun ;).

After making this change I reconnected to the remote server with the following commands:

lftp -u newsiteusername newsite.example.com
Password:
lftp newsiteusername@newsite.example.com:/> lcd /fake/local/website/directory
lcd ok, local cwd=/fake/local/website/directory
lftp newsiteusername@newsite.example.com:/> cd fake/remote/website/directory
cd ok, cwd=/fake/remote/website/directory
lftp newsiteusername@newsite.example.com:/fake/remote/website/directory> mirror -R

So that was the end of another enthralling adventure in the land of Linux web hosting.

How To Add Meta Tags to a WordPress Blog

Adding meta tags to your WordPress blog is a fantastic idea and one that I have overlooked until now. But a bit of a nudge from this scruffy little fella woke me up to the lack of meta tags on my blog — it seems like WordPress isn’t into meta tags out of the box, and I wasn’t happy.

Glenn Kentwell googling and coding up my meta tag change

Me, googling and coding up my meta tag change!

Matt’s nudge was actually that I should add a meta description tag so that the search engines show an alluring chunk of text beneath my link, instead of the current crap excerpt from that ridiculous post about Brisbane finally getting rain.

So I decided that I need to have my meta description text to be the same as my blog subtitle, known as the “description” to the WordPress application itself. I decided, for now, to go for this:

“Or, 101 ways to improve your social life! And that’s ironclad!”

Who’s not going to click when they read that?

Naturally I was doing a task, so the first step is to google how to do it. I googled for WordPress meta tags and found this Codex article about how to add meta tags to WordPress. It’s pretty easy really. You just need to edit the header.php file of your WordPress theme to include a meta description tag that has the value you want, in my case the text above.

So here’s the code I inserted into the header.php file of my WordPress theme. It uses the bloginfo template tag to display the blog’s description, as you may peruse below:


<meta name="description" content="<?php bloginfo('description'); ?>" />

So, now I just need to wait for the search engines to update their listings and I will be swimming amongst a traffic bonanza. Booya, thanks Matty!

I Fixed My Feed!

That’s right fans, I’ve finally fixed my RSS feed. I thought it just randomly broke, but it looks like I was stuffing around with a random file that actually gets included in the RSS XML and it broke everything. The end.

In other news I’ve been on holidays and got back, and I have tons of photos.

In still other news, we successfully launched the new Suncorp website this week. It’s a massive site and we built it using ASP.NET and C#, with lots of user controls and master pages to help get us through. We had some server troubles at first but now we’re looking good and the site looks like it’s going to hold up nicely. I’m stoked, because I’ve been working on the project since May and it’s great to see it finally come to fruition.

The Secret to Getting Abs Like ‘300′ Spartans

You too can have abs like the Spartan warriors from the movie 300! Just follow this easy workout:

25 pullups, 50 deadlifts with 135 pounds, 50 pushups, 50 jumps on a 24-inch box, 50 floor wipers, 50 single-arm clean-and-presses using a 36-pound kettlebell, and 25 more pullups. Do this workout for time - try & beat your time from before. Like a race. Speed, power & intensity are key. All circuits completed in 20 minutes.

Easy.

South East Queensland Gets Rain

Well I don’t remember the last time I saw a Bureau of Meteorology radar image of Brisbane and south-east Queensland like this one. It’s raining!

Rainy Brisbane radar image

Well, hopefully the drought breaks, even though the QLD government is spending millions building water recycling and pipelines that come online in the next few months. Not that it will be wasted; more than a thousand people migrate to Queensland every week so the infrastructure is starting to struggle, and who knows how climate change will affect our rainfall and climate.

Videos Reveal The Key to Online Success

WebProNews are now doing video, to my surprise as a long-time email newsletter deleter of theirs. They’re good videos, too, with interviews with successful web marketing gurus and plenty of advice. At least, the two I’ve watched so far have been.

Matt Bailey of sitelogic.com is interviewed in this video, he talks about the wonders of using Youtube as viral marketing and has first-hand experience with a pre-release product. He also talks about why Digg is great for getting lots of traffic and exposure in a big hit, but the traffic is generally low-quality in terms of customers ready to buy products — they’ll read your content and then leave.

The other vid I’ve watched so far is with Eric Ward on “link baiting”, a term he doesn’t like because it sounds a bit dubious. He really advocates just creating quality content that people will want to link to. But I think it’s a mix of art and science to get people to actually link to you; a clever headline or title tag or a catchy video clip makes a world of difference.

Check out my del.icio.us linkbaiting tag for some more info on link baiting ideas — what it is and how to do it. It works if you do it right — I like this quote from the seomoz blog:

Every so often, one of our employees will roll into the office and announce, “I’m going to get on Digg today.” Said employee will sit down, write something and then nervously monitor the server as predicted Digg occurs. I can only remember one instance in which this tactic has failed.

I am 23 years old (at heart)


You Are 23 Years Old


Under 12: You are a kid at heart. You still have an optimistic life view - and you look at the world with awe.

13-19: You are a teenager at heart. You question authority and are still trying to find your place in this world.

20-29: You are a twentysomething at heart. You feel excited about what’s to come… love, work, and new experiences.

30-39: You are a thirtysomething at heart. You’ve had a taste of success and true love, but you want more!

40+: You are a mature adult. You’ve been through most of the ups and downs of life already. Now you get to sit back and relax.

Fitness First Lets Me Leave!

Today should be the last time Fitness First ever take money from my credit card. Amen. Never did I think this day would arrive.

I know that it’s today because it’s written on my Fitness First “Departure Application” form. Yes it is called an “Application” because the process of leaving applying to leave Fitness First is more grueling than their RPM classes.

The first thing to do when you want to quit Fitness First is make an appointment to see your “Customer Care Manager” — I feel so loved and cared for. Making this appointment is not the easiest thing to do if you have a life of your own; there’s only a few appointments per day and they were well booked at both Mt Gravatt and the Brisbane City Fitness First gyms I checked.

So my appointment was booked and the man behind the desk said that he would put a note in his computer to say that I’d asked to quit that day (a Wednesday, my Departure Application appointment was the next Tuesday) so that I wouldn’t be billed an extra two weeks. Nice.

I turned up at my appointment on the Tuesday at lunchtime. My caring Customer Care manager was about 15 minutes late — I’m not the most punctual person ever so that didn’t really bother me but he did blame his receptionist in the first sentence he said to me. Good one.

After that, my Departure Application Interview went something like this:

CCM (Customer Care Manager):
So what did you think of Fitness First?
Me:
Well I felt pressured into joining in the first place, I was never shown an exercise program or given any assistance except by a paid personal trainer, and if I didn’t visit for a while nobody called to check how I was doing or encourage me to come back. Other gyms I’ve been to did both of those things.
CCM:
Well, Fitness First is really aimed at the more savvy gym user…
Me:
Well I just thought for the amount you are charging — I mean I’ve paid $960 in membership over the last year and I would think that should include some assistance…
CCM:
Well obviously we aren’t setup to do that, we can’t provide that [blah blah blah x amount of members etc etc excuses as weak as the receptionist one]
Me:
Well obviously you guys have your reasons but I just think for the amount I was paying I want more for the money.
CCM:
OK so what are you doing now; are you quitting because you haven’t been using your membership or because you have somewhere else to go like a gym at work or something?
Me:
Well I am moving and I will have a gym at home, yeah, and there is one at work as well.
CCM:
Because if you feel as though it is too expensive, we do have cheaper options like one for ~$17/fortnight which gives you a single visit per week…
Me:
No.
CCM:
…or there are other options like you can sell your membership to somebody else if you have friends or family who might want to take it over…
Me:
[thinking...as if I am going to inflict this on a friend or family member] But if I sign this form I’m out, right?
CCM:
Yep that’s it.
Me:
*signs form* OK, thanks.

So that was that. I guess we will see whether I am billed by Fitness First on 3rd May; won’t the fun and games begin if I am!

So that’s it — I’m a Fitness First member until 2nd May, 2007 and then no more! Woohoo!

Two things though.

Firstly, Fitness First is so not a gym just for “gym savvy” people, it’s marketed and branded to attract beginner gym-goers with its friendly, slick, non-threatening image with shiny machines and no dirty old weights being slung around by huge sweating blokes. That statement from the CCM was just rubbish.

Secondly, how hard would it be to provide the extra service? A person to sit and call people who haven’t been in to the gym for a while wouldn’t be an expensive exercise; you don’t need qualified personal trainers for that, just somebody who sounds nice on the phone. I would guess that to cost maybe $40,000 a year including all extra crap like recruitment and whatever else goes along with having a person employed.

But, of course, you couldn’t oversell your membership as much because your members would be in the gym, using the equipment, instead of at home on their couches!

Having a personal trainer just floating around the gym all the time helping random people with their workouts wouldn’t cost that much more than the phone person. Let’s say they cost $60,000 a year including all the extras.

That’s $100,000 a year for both staff, or about 100 members’ membership costs. If you believe the Fitness First website, there are 330,000 FF members and 79 gym locations according to the gym search. That means there’s an average of 4,177 members per gym, and that each gym should average $4 million in revenue per annum.

Spending $100K to provide good service doesn’t seem like much of a chunk out of $4m+ a year per gym, does it?

Goodnight…