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 ). |
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
This one goes out to my wife and her love of polar bears.
I couldn’t even believe this was a photo. Just figured it was a painting. What amazing imagery the earth provides!

After my Geekfest presentation this week, I had a quick conversation with Jim Breen about why I decided to create an invoicing app.
The answer goes a little something like this:
When dealing with my own clients, I found myself always on the cusp of a ‘free’ plan while using other invoicing services. I wasn’t quite ready to make the move to paid offerings because for the most part I could still manipulate the situation usually by waiting to invoice until the month changed.
Then I got to thinking… why on earth wouldn’t I just create an invoicing app. You know, something I can use internally. So after my time at Obtiva’s TDD bootcamp, I ran home and pretty much threw out what I had and started from scratch. For the most part the project came together within a week or so. Now normally I have do all of my own design/stylesheet work but I was fortunate enough to have a friend help out with that this time along. This really really freed me up to work on the actual system. Once we had most of the functionality that I wanted to have, my friend said that I should offer it up for sale as a service.
Luckily Jim only had to listen to my short story but I will finish here for you all of you in case anyone is interested. We’ll get back to the story at hand in a moment!
That got me thinking… maybe it could provide a little extra income if only even a few people subscribed. So I figured what the hell and started work on that. The idea was simple but it does add a bit more to the app as now I have to account for different users, domains, subscriptions, etc. Not horrible but, you know, extra work. This is also where I started feeling like an ass… internally of course.
Why am I trying to sell this software as a service when it was created solely to avoid paying for a service? Quite the conundrum I would say! That’s when I decided the project, or at least the majority of it, would be open sourced. I’m still playing with the details on how to protect myself as a business and still allow the community to have the project. You can even find the project in an early state on Github.
I was also very particular about the pricing model. With a dislike for limited features and tiered pricing, I decided Breadbox would have very little of that. There will be a free plan with a limited set of features but what I feel is a great offering. Then there will be a paid plan at an extremely competitive price point. The key here is that the paid plan will make everything the service has to offer available. Anytime new features are added to Breadbox… paid users will just get them.
To me this was a different way of thinking about the pricing structure that we seem to be accustomed to nowadays with most web services. Or… there’s a reason for tiered pricing. And now back to our story.
When I was finished with my pitch, Jim kinda smirked and asked: “What happens if a user starts sending out 1000 invoices a month?” That’s when it instantly occurred to me where tiered pricing is key! At that point I knew the cost of dealing with a customer who uses the service like that would outweigh the price they were paying. The only way I see to combat that would be to have many other paying customers that don’t use the service as much. So thanks to you, Jim. This provided me with a train ride home of thinking.
During this whole journey I knew that I wanted to cater this service to really small businesses and freelancers because that’s what I am an in effect what it was designed for. So I think the service is going to get a little opinionated ( well more than it already was ). In case you’re still here with me… this is what I came up with.
Breadbox paid plans will have a max sent invoices cap. I feel the cap amount would be around 50-75/mo. The conclusion came to be when I thought, who am I catering this service to? If small businesses or freelancers are sending more invoices than that a month… they are probably in need of a more robust system anyway and I would be more than happy to recommend one to fit their needs. Fortunately in this world I don’t have to be everything to everyone. Will this decision or way of thinking hurt business… maybe. Do I care? Not really, as I put thought into this and feel it’s a good decision for the service. People will find the service has value and continue to pay. Some will not and move on. I’m OK with that.
Thanks to Jim for making me think about something that would have not crossed my mind until it happened. Anyway else that has input, feels the cap should be a different amount or some other question… please share.