RSS

New site design

Published on 05/15/12

I just updated the design of this site to a new responsive design template I developed. For my web design business, I offer design themes for ‘Net-at-hand’:http://net-at-hand.com that are based on a template. This lets me focus my design work on header graphics and overall color scheme while the layout remains set.

Many of my clients opt for this option as it is an inexpensive way to get a great website, usually keeping the cost of the project relatively low.

This weekend I completed a website for a friend and am now offering it as a responsive web design template. The overall layout of the site responds to the size of the screen and adjusts itself accordingly.

I’d love to know what you think of it.

Rolling restart of thin instances using monit

Published on 04/27/12

With Net-at-hand’s recent move to AWS EC2, I had a chance to build the new server from scratch.

In doing so I started using thin as my application server instead of mongrel, and I started using monit for monitoring my application servers instead of god. The main reason for the changes had mostly to do with memory usage by each of them. Monit uses much less memory and is more stable than god, and my rails app on thin is only using around 70MB instead of 110MB+.

One thing that I’ve always wanted an easy way to do is a rolling restart of my applications servers. A “rolling restart” restarts only a portion of the running applications at any given time so there is no time when there are no application servers available.

When configuring monit, you can assign a group to the running instance, but it turns out that you can assign more than one group by putting in multiple “group” directives for the same instance. So all the thin instances that are listening on even-numbered ports have the following lines in their configuration:

group thin
group thin-even

And then all the thin instances that are listening on the odd-numbered ports have the following lines in their configuration:

group thin
group thin-odd

So if I need to restart all of them at once I sould issue this command:

sudo monit restart -g thin

However, to do the rolling restart I just restart the “thin-even” group first, wait for a bit, then restart the “thin-odd” group. This is done automatically in my capistrano deploy.rb file by issuing a “sleep 10” in between the two restart commands. The restart task in my deploy.rb file looks like this:

task :restart, :roles => :app do
    sudo '/path/to/monit -c /path/to/monit.conf restart -g thin-even'
    sleep 10
    sudo '/path/to/monit -c /path/to/monit.conf restart -g thin-odd'
end

So now, I push code changes to Net-at-hand in the middle of the day with no hesitation because I know it isn’t going to cause an outage (of course, I do it all on the staging server first just to make sure nothing blows up :).

A new hard drive

Published on 11/19/11

I was finally able to get the SSD that I have been wanting to get for quite some time now.

Let me just say that I am impressed with how fast it is. Things are just snappy and instant. I am very pleased.

The thing I am even more happy about right now is how quickly I was able to set up my work machine with the new drive. I did a brand-new clean install of osx lion. It used to be that it would take me days to get a new machine set up. This time however I had icloud to get all my contacts, calendar events, and music onto the new machine. My apps were a pretty quick install through the app store.

Even my development environment for Net-at-hand went together really fast thanks to homebrew and rvm. It used to take me about a day to get ruby and everything I needed installed. I spent less than an hour on it tonight and I am done and ready for bed.

Very happy.

Steve Jobs

Published on 10/06/11

The death of Steve Jobs is a big deal.

Actually, as I write that sentence, I am struck with the simple truth that the death of any person is a big deal. Each person is a universe. We often get so caught up in what is happening in our own lives, the hurts and struggles and fears; we often feel overwhelmed by the bigness of our own lives. We are so self-absorbed in fact that we don’t stop to realize that every stranger we pass on the sidewalk has the same bigness going on within their own universe.

So it is the knowledge of this fact that makes my first statement seem a little, I don’t know, overblown. Steve Jobs crossed the same threshold that all mankind crosses, and he crossed it and faced eternity with the exact same opportunities that every other man has had who has died before him. So I feel odd drawing attention to the death of someone I didn’t know. I’ve never spoken with him. I don’t know his family. The fact that Steve Jobs was alive yesterday morning and is not alive today, doesn’t even really change my day all that much.

Obviously, Steve Jobs was immensely important to his family. They don’t get to wake up today and go about their day as they always have. They are the ones who are suffering and mourning profoundly. Eventually their lives will start moving forward again, but they will always feel the loss of Steve, as a father and husband.

My day, however, starts only with a sense of melancholy (which is why I am writing anything at all); I am still just going to work and raise my kids and love my wife as I always do.

So why any melancholy at all?

As I said, I’ve never spoken with Steve Jobs, but he has spoken to me many times over the last 14 years or so. My professional life has always been connected with Mac hardware, and I have always looked forward to the next great thing. I’ve been watching “stevenotes” for many years, hearing Steve describe the new mac, or ipod, or iphone, or ipad. I don’t really get into the whole Hollywood celebrity thing at all, but Steve definitely was a celebrity, and based on all the times I have seen him, I feel a connection to him as a person. He has brought so many cool gadgets into my life, and he had such passion about doing it, that I can’t help but feel the loss. As a businessman he absolutely was a role model to me. He never accepted the status quo and he worked tirelessly to make life better through technology.

I don’t have any idea what Steve Jobs’s spiritual condition was, but I respect the work he did. The tools he helped create, and led his teams to create, have been used for decades around the world to do great work. Who knows how things will be now compared to what they would have been if he had lived another twenty years. We will never know that, and there really is no point in wondering. All we can do is thank God for the abilities that he gave to Steve Jobs, and for the work that he was able to do while here on earth, and for the work that we can do better because of it.

How to resize a virtual machine’s disk with VirtualBox

Published on 08/23/11

I use VirtualBox for running windows on my Macbook Pro (mostly for browser testing). I recently decided to give Age of Empires Online a try but filled up my virtual hard drive that was running the system.

I the GUI interface in VirtualBox does not have any way to clone a drive and resize it at the same time, but I found this post that shows some of the underlying software does. It was dead easy to do.

The only difference for me, since I am running a mac, was the location of the command line utility that it uses. On OSX it lives at

/Application/VirtualBox.app/Contents/MacOS/VBoxManage

I hope this helps someone else!

Quickly make a new Evernote Note from selected text on OSX

Published on 08/02/11

As I’ve posted recently, I have started using Evernote for keeping track of all my stuff. I’ll put everything from passwords to files that my client sends to me in Evernote because Evernote makes it dead simple to find what I need later on, and I’ve got access to it from anywhere.

One thing I don’t like, though, about Evernote is how cumbersome it is to create new notes when I am in other apps on OSX. The best-case scenario was to select the text I wanted, copy it to the clipboard, and hit the key command for “Paste to Evernote”. This works alright except that it brings Evernote to the foreground and pulls up the new note dialog box. So the process for getting a new note was to:

  • Select some text
  • Hit Command-Option-C
  • Type in the title of my new Note
  • Close the window
  • Go back to my application I was in originally
  • Find where I was and continue on

It’s the last three steps that kill the flow of getting things done, so I decided to try to create a service in Automator that would make this simpler. The following applescript will take the selection, give a quick dialogue for a note title, and create the note in Evernote. During this process, you never leave the application you’re working in; there’s just a quick dialogue box to give the note a title.

I’m not going to give a tutorial about how to set up the Automator service, but it is pretty simple to do. Just change the title of the notebook in the applescript code below from “Default Notebook” to whatever notebook you want to put your notes into.

on run {input, parameters}
    set dialog_box to (display dialog ¬
        "Note title:" default answer ¬
        "Untitled Note" buttons {"Canel", "Save"} ¬
        default button 2)
    set button_clicked to button returned of dialog_box
    set note_title to text returned of dialog_box
    if button_clicked = "Save" then
        tell application "Evernote" 
            tell notebook "Default Notebook" 
                set new_note to create note with text input as string
                set title of new_note to note_title
            end tell
        end tell
    end if
end run

Some work tool changes

Published on 06/17/11

I’ve recently made a couple changes in the tools that I use for work and thought I would mention them.

Sparrow is a new mail client that I have fallen in love with. It is clean and simple; just the way I like it. It is only $10 so much cheaper than what I had previously tried.

Speaking of mail, I also switched from using my own email server to using a Gmail mailbox. All me email addresses forward to it and I could not be happier. It is fast and I don’t see any of the spam in my inbox. Setting it up as an Exchange mailbox with push on my iPhone was also nice.

Alfred is a newish keyboard productivity tool that all the cool kids are using these days. I had used Quicksilver for a long time, but grew tired of its quirks and the fact that those quirks weren’t going to get fixed since it was no longer being actively developed. After that I just used the built in spotlight search in OSX which was generally fast enough, but I found myself wanting to send quick emails without having to grab for the mouse. So I’ve had Alfred for about a day and really like it. You can try it for free and get most of what you would want, but the paid version has some really nice features.

Evernote has become my tool to keep everything. I was using a smattering of tools, but I ran across a situation with client files that I needed something more. When I client sends me a file for use, I would put it in a specific folder. That file would then get checked into the repository and become part of the project. The problem is that there would sometimes be things that I needed to remember about that file. I would put a note for myself somewhere, but there was nothing that made me look at that note when it came time to use the file. Evernote solves this problem with the simple fact that I can attach files to notes. So now when a client sends me a file for use, I don’t even put it in the project, I just put it in Evernote and add whatever comments I need to to the file. So when it comes time to use the file, I don’t look in the files system, I look in Evernote. Now, obviously if a client sends me a huge file, I don’t put it in Evernote because it would take too long to upload and use too much of my monthly bandwidth. But I still create a note for the file and add a link back to the file on the file system (or the email that they originally sent to me). This scenario for Evernote is working well, but I also am in love with the idea that anything and everything is going into it and I can easily organize and search it (on the mac, iphone, and ipad). It works great. I would not call the interface pretty at all (almost ugly and somewhat clunky are more accurate), but the utility makes it easy for me to overlook that fact.

So that is what I am using these days, and I am very happy with all of them (until the next shiny new thing comes along that I can’t live without).