Sometimes... stuff happens |
I am a father, husband, son, friend, software developer who loves Ruby, and an unemotional robot ( or at least that's what I've heard ). |
This one goes out to my family.
I’ve recently been trying to learn the ins and outs of Heroku as I find it to be a great platform for hosting my applications. A few weeks ago I did a presentation that reviewed Heroku’s service for Obtiva’s Geekfest. When showing off how easy it was to throw up a maintenance page someone inevitably asked “Can you customize it?” I said that I hadn’t tried it myself but I couldn’t imagine them not letting you, so here is what I found out…
Absolutely you can customize your maintenance page and I’ll show you how easy it was for me to update my business site to use it!
Regardless of what type of Ruby application you’re hosting (Rails, Sinatra, etc) you can do a custom maintenance page. Just create a “public/maintenance” directory and inside it you’ll be dealing with “index.html” Pretty simple right?! It’s just a plain HTML document. Here is what I came up with:
Nothing fancy there… now for some styling. Here is one of the gotchas I ran into. Instinctively I had added my styles to my normal application stylesheet. Unfortunately this did not work. When your maintenance page is active, all requests are redirected to this index page. This makes the request to grab your stylesheet redirected as well so no external styles. No biggie… there is not much to style, I’ll just do it inline.
Cool… there are my styles, but wait, my image is not showing up!? Well this is another case of a request being made that eventually gets rerouted because of the maintenance page. I ended up just throwing my maintenance image up on an external service so there will be no complications with this. Here is the final code:
Now all you have to do is issue the command
heroku maintenance:on # turns on maintenance page
When the maintenance page is turned on, all requests get routed to this page and this is what my visitors would see:

To stop the maintenance page and return request routing back to normal just issue:
heroku maintenance:off # turns off maintenance page
Overall this is a very simple process and hopefully is just a bit simpler now that I’ve worked out those couple of ‘gotchas’ for you. Please leave a comment or screenshot with your maintenance page. I’d love to see them!
MongoDB in your face! Well really in your browser but in your face sounded cooler. Hows that for a title!?
Thought this would be useful for those who want to try out Mongo before tomorrows ChicagoRuby meeting.
| David: | Watching video on the ipod touch sucks |
| Noel: | It beats watching video on the back of my hand |
FuelCollective’s Swatch is being used on the screen. How minimal of them ;-)
Office-to-go.
Submitted by sabbatical
If anyone is interested, this is the slide set from my presentation at Obtiva’s Geekfest this past week.
As I’ve been doing more video editing work lately, there was something always bugging me. How to I easily get some kind of logo onto the video that would persist through the project? It seemed like more work than it really should be after looking at some tutorial videos. Once I figured it out… it’s not hard at all and I’d like to share.
When shooting a project I tend to film in HD and export to the web. To be honest, 960x540 is probably the perfect resolution for HD web video ( even though it’s not technically HD at that point ).
The tutorial will start with opening your image editor of choice and start a project with dimensions of 960x540 and a transparent background. I prefer Pixelmator for these kind of tasks so that’s what you’ll see today.

Now just add whatever elements you need with the placement you desire. I am going to add a small logo to the left hand corner.

Now go ahead and export your image as a transparent PNG

Then you’re done with your image editor and can close it down if you feel it necessary.

Open up your project in iMovie

There may be a better way to do this but just grab your newly created PNG and drop if on the timeline. Here you’ll be presented with some options. You’ll want to select cutaway.


Once the cutaway clip is added to the timeline, adjustments can be made to how long you want to it appear. Just drag to desired position.

If you’re like me, you never changed the defaults on your project so pretty anything that can be Ken Burns’d… will be. Now we’re going to turn that off.
Click on the adjustments button on the bottom left corner of the cutaway and select Cropping, Ken Burns & Rotation.

In the preview window you’ll see some red and green outlines and the Ken Burns button will be highlighted.

Select the ‘Fit’ button and the outlines should disappear. We chose ‘Fit’ because in our image editor, the image was already created at the correct resolution that we needed.

All done! That’s all you had to do. The only bad thing I noticed is that you can’t seem to line the cutaways right up to a transition. If it’s too close the transition doesn’t seem to activate. If anyone knows of a better way, please let me know in the comments. I’d love to hear how I can improve this technique.
Now if you want to create a watermark, you’ll do the same thing except you’ll adjust the opacity your cutaway. Here is how to do that.
Click the adjustments icon on the left lower corner again and select ‘Clip Adjustments’

You’ll see the Opacity slider

Just slide back to your desired transparency and there you go!

I hope this proved useful to someone and like I said before, if anyone knows of a way to improve this technique… let me know.
Lego Star Wars on Hoth… amazing!
Go check out the rest of the set on Flickr