Archives

Month: April 2017

  • Moving your Jekyll Site to Amazon S3 and Cloudfront with Outside DNS


    If you are using a static site builder like Jekyll, Amazon S3 is one of the cheapest hosting solutions around. To speed up delivery time for a little extra cost, I recommend using Cloudfront in front of S3.

    A few months ago I decided to serve my static assets from S3, but yesterday I decided to take the full jump. Here is what I did to make the move.

    This full guide will be most useful for static sites on existing hosting solutions that you are moving to AWS while using outside DNS services. This guide uses s3_website, Amazon S3, Amazon Cloudfront, and a non-Amazon DNS service.

    If you are setting up a site from scratch, use Amazon’s guide instead.

    0. Back up your stuff

    The steps below worked for me, but I can’t guarantee everything will work for you. Back up your stuff so you can roll back. You’ve been warned.

    Really, before you make a mistake and mess a bunch of stuff up, make sure you have a back up of everything:

    • Your local Jekyll site
    • The content on your existing webserver
    • Screenshots of your current DNS settings

    1. Set up your AWS account

    Set up an account at Amazon Web Services.

    2. Download and configure s3_website

    s3_website is a very useful tool for automatically setting up buckets on S3 and a Cloudfront distribution to host a static site. It also helps easily deploy updates to your static site with a few commands.

    Follow the tool’s instructions on Github.

    • Run s3_website cfg create. This generates a configuration file called s3_website.yml.
    • You’ll need to make an AWS user for the tool with access keys and set your configurations in the s3_website.yml file.
    • Run s3_website cfg apply. This will configure your bucket to function as an S3 website. If the bucket does not exist, the command will create it for you. When you run this, it will ask you whether you want to deliver your website via CloudFront. If you answer yes, the command will create a CloudFront distribution for you.

    Handling non-Jekyll content

    If you have content on your webserver that doesn’t exist in your Jekyll site, you’ll need to set some extra configurations for those things in the s3_website.yml. For example, I serve a bunch of PDFs that are separate from my actual Jekyll instance. If you do, too, make sure you take advantage of the ignore_on_server section of the configuration. Make sure to uncomment it (remove the # in front of it) and list the folder paths from the root that you want the tool to ignore on the server. Otherwise folders not on this list and not in your Jekyll site will be removed.

    I added these:

    ignore_on_server:   - justanswer   - illum 

    Reminder: Don’t use tabs for formatting in YAML files. Use spaces.

    3. Deploy your website using s3_website

    Run a new build on your Jekyll site: jekyll build

    Then, push up to the AWS environment: s3_website push

    Don’t worry, even though the s3_website.yml gets added to your _site folder, it won’t get uploaded to S3. The tool skips it. I triple checked this because I didn’t want to publish my access keys online.

    Wait 15 or 20 minutes for your site to propagate across Cloudfront (the Cloudfront dashboard shows the propagation status.) Once it does, check your Cloudfront domain (or public S3 domain if you aren’t using Cloudfront). The s3_website tool gives you both domains during your initial setup, or you can always get them from your AWS console at any time. For example, my Cloudfront domain for this site is d27zm8z2abfvhn.cloudfront.net and my S3 domain is http://cagrimmett-jekyll.s3-website-us-east-1.amazonaws.com.

    Check the domains and make sure everything seems to be live and working correctly.

    4. Add your own domain to Cloudfront or S3

    First, add your domain, including the www, as a CNAME on your Cloudfront distribution. This allows Cloudfront to serve requests to this domain once it is point there. This is the easy part.

    Pointing your domain at Cloudfront without using Route 53 as your DNS provider

    I have a bunch of DNS records on cagrimmett.com, so I didn’t want to migrate my DNS over to Amazon’s Route 53. That means I had an hour of trial and error (as well as a consultation from my friend Eric DavisArchived Link) figuring out how to get things to work. Also, the typical A record pointing won’t work because the IP addresses to Amazon’s servers change regularly.

    The solution we settled on is: CNAME the www subdomain to Cloudfront and forward all cagrimmett.com requests to www.cagrimmett.com.

    To CNAME your www subdomain to Cloudfront, just log in to your DNS service and add a new CNAME record for www (or change the existing one if you have it) and point it to your Cloudfront domain, which is the one that looks like this: d27zm8z2abfvhn.cloudfront.net.

    You have two options for forwarding non-www requests to the www subdomain:

    A) If you aren’t using your domain for anything except this site, you can use your DNS service’s domain forwarding tool if it has one. Set it up to forward domain.com to http://www.domain.com. Note: If you are using your domain for anything else or if any subdomains point to the @ record, don’t use this option. I tried this and took down my other sites, which are served from subdomains of cagrimmett.com.

    B) Use Apache or nginx to rewrite requests. This means that you still need your original hosting, but it will only be used to rewrite your domain requests. This isn’t an issue for me because I still need my hosting to serve cooklikechuck.com, amandakate.me, and my dev and staging areas for WordPress development. This option isn’t ideal, and definitely not what I would have designed from the beginning, but I don’t want to burn everything down and start over. So Apache it is. Here is what my rewrite rule looks like in my .htaccess file:

    RewriteEngine On RewriteRule ^(.*) http://cagrimmett.com/$1 [QSA,NC,NE,R,L] 

    This takes any non-www requests and rewrites them to the www subdomain, preserving the whole query string, making sure existing links to your content around the web don’t break.

    Wait an hour for all changes to take affect and you should be good to go!

    5. Deploying updates

    Since we used s3_website, deploying updates and new posts to your site will be super easy:

    Navigate to your Jekyll site folder and build your Jekyll site: jekyll build

    Then push up to the AWS environment: s3_website push

    That’s all!

    A note on SSL

    I opted to not use SSL for my site right now because there are a ton of extra steps and extra cost involved. I’ll probably revisit this later when Google starts penalizing non-secure sites, but for the time being I’m sticking with plain http. I’m not collecting any user-submitted data.

  • 3 Lesser-Known Hubspot Tools


    Hubspot is an easy-to-use marketing and sales CRM. It is a lightweight alternative to Salesforce and Microsoft Dynamics that has a ton of marketing and sales functionality.

    This week I dug in to it and found some lesser-known features:

    What if your workflow involves emailing contacts to get them to fill out a form, like an Application form? It is annoying for the user to fill out information you clearly already have, such as Name and Email Address. Smart Forms are a partial solution to this problem, but don’t work if people fill out one form on their computer and another on their phone three days later.

    After some digging, I found out that Hubspot allows you to assign information about your contact to variables and append them as query strings on URLs.

    This means you can set up email templates to make it unnecessary for your customers to type information over and over. Awesome.

    Any time you drive someone to a form via email, you should use query strings to automatically fill things for them.

    COS URL redirects

    Hubspot’s Content Optimization System (COS) is essentially a landing page and content platform hosted on Hubspot. You usually set it up on its own domain or subdomain and it is useful for tracking user interactions. Let’s say you are no longer using a COS page, but it is linked somewhere and people keep hitting it. What do you do?

    I found the solution buried a few levels deep into the Marketing platform. There is a URL redirect tool built in.

    Leverage connections to other apps via Zapier

    Hubspot connects with Zapier, so it connects automatically with 750+ apps. New contacts, contact updates, calendar tasks, social media messages, and form submissions can kick off workflows.

    For example, you can:

    • Text someone a download link after they fill out a form
    • Pipe notifications of new sign ups or form fill-outs to Slack so you know about them
    • Copy contacts over to Google so you can make a personal email contact
    • Sync Hubspot lists with Mailchimp
    • Copy Sumo leads over to Hubspot
    • Add sales customers from Shopify or Stripe to your Hubspot contact list
    • Create Hubspot contacts from Facebook Ads Leads
    • Create tickets in Zendesk from Hubspot forms
  • At Praxis, Commitments Are Better Than Rules


  • LER on Light


    There is but one cure for ignorance: enlightenment! Lesser treatments, such as ‘selling the masses,’ political activism, and the like, are an utter waste of time; as well try to bring daylight by cursing the darkness!” (To Free or Freeze, p. 18)

  • The Great American Road Trip


    I got the chance to spend a week driving from coast to coast with my parents last summer. We started just north of Seattle, took Route 2 across Washington, Idaho, Montana, North Dakota, Minnesota, and Wisconsin, then went across the UP and drove down through Michigan, then across Ohio and Pennsylvania on I-80 to NYC.

    The route we planned. We deviated slightly on where we stopped.

    Day 1: Bellingham to Coeur d’Alene

    We left Bellingham after meeting a friend for an early lunch and decided to cross Washington all in one day. It went like this: The Cascades, apple orchards, then endless wheat fields. Somewhere in the middle of apple country we found an awesome burger shack and decided to stop for dinner. The cheeseburger and a banana shake hit the spot.

    We thought we’d drive to Spokane and just Priceline a hotel when we got there. Rookie mistake. Since it was the summer season and there was an unforeseen issue at the airport that grounded all flights, literally every hotel within 50 miles was booked. Even the casinos were booked. Thankfully, some gracious friends from college, the Herseys, offered to let us stay with them an hour away in Coeur d’Alene, ID.

    Days 2–3: Coeur d’Alene to Glacier & Waterton

    The first thing we did the next day was book hotels for the rest of the trip. We weren’t going to get lucky with nearby friends while going across the plains. We then took a leisurely route through the mountains to get over to Glacier National Park. We explored Lake McDonald, the Trail of the Cedars, and Avalanche Creek.

    The next day we got up early, went across Going To The Sun Road, and drove up to Waterton, Glacier’s sister park in Canada.

    The drive took longer than expected, so I had to sprint to buy us tickets for the boat tour of Upper Waterton Lake. It was well worth it. We saw some incredible scenery and caught a glimpse of a momma black bear and her cubs. I got a proper sunburn, got my shoes wet, and took hundreds of photos. A good day, all in all.

    Upper Waterton Lake

    Day 4: Glacier to Minot, ND

    We got up early, drove around the southern edge of Glacier, saw a moose, and settled in for a long drive across the plains. We set Minot, ND, as our destination for the day, which was a 15 hour drive across hot, dry, flat, featureless land. Thank goodness for podcasts! Lunch options were slim, so we found a grocery store and bought stuff for sandwiches, which we assembled and ate in the parking lot.

    Dinner options were slim, too. The plains are an empty place. We had dinner at The Taco Shack in Glasgow, MT, the only town we saw for hours. I got their special, “The Emmet”: a plate of tater tots covered in taco meat and cheese.

    The look on my parents’ faces pretty much sum it up.

    Day 5: Minot, ND, to Marquette, MI

    After a short night of sleep (we arrived late in Minot), we got back on the road and made for Marquette, MI. After about an hour and a half on the road, we cruised through Rugby, ND, and made a quick stop at the geographical center of North America.

    The geographical center of North America is in the middle of a parking lot.

    I had to work for the last four days of the trip, which was challenging. I got up early, stayed up late, took phone calls at rest areas, and answered emails in the back seat when I wasn’t driving.

    We stopped at Duluth TradingArchived Link in Duluth, MN, then kept on trucking. I was exhausted by this point, so all I remember is 1) how many bugs hit our windshield in the UP and 2) how flat the UP is. I expected it to be more hilly for some reason. We rolled in to Marquette around 1:30am and passed out immediately.

    The next morning, we realized that there were so many bugs splattered across the windshield that we had to wash it at the next gas station.

    Day 6: Pictured Rocks to Cleveland, via Zingerman’s

    We had planned on spending the day exploring Pictured Rocks and the Sleeping Bear Dunes, stay the night up there, and drive to Cleveland the next day, but we were so exhausted that we opted to skip the dunes and drive to Cleveland that day. We took our time around Pictured Rocks, then I shot a hyperlapse of going across the Mackinac Bridge and we cruised all the way down to Zingerman’s in Ann Arbor for dinner. After stuffing our faces with fantastic sandwiches, we drove the last two hours back to the Cleveland area.

    The Muffaleo at Zingerman’s

    Days 7–8: Cleveland to Yonkers

    I stayed at my parents’ house for two nights, which was just enough time to visit with family and get my favorite pizza.

    Left: Dad drawing with my goddaughter. Right: Yala’s Pizza.

    I took I-80 across Pennsylvania back to NY by myself on day 8, completing the trip. I’ve taken that 8 hour trip dozens of times over the past 5 years, but after driving 12+ hours a day for the previous week, I was ready to get out of the car. I didn’t even take any photos!

    Tips for planning your own trip

    • If you plan to do a trip like this, Road Trip USA has a great guide that you can use as a starting point.
    • Make sure you build in rest time along the way.
    • Get off work entirely. Juggling deadlines while driving is stressful.
    • Take snacks.
    • Get fuel when you can. The plains are desolate.
    • Book hotels in advance so you don’t get stuck somewhere.
    • To document the trip, make sure you do something fun like shooting little video clips or doing panoselfies (our medium of choice) along the way.
  • The Great American Road Trip


  • Do More. Improve on it. Repeat.


    Do you want to be on top in your field? The bar is lower than you think, but few people even attempt to jump it. They will talk about jumping over it, but when it comes time for them to make the leap, they step back.

    You don’t have to be smarter than your peers, start out with more money than the other people in your class, or have better tools than the competition.

    You just have to be more persistent than them. Show up and do the work every single day. Keep pushing forward when others stop.

    Attributing success to luck is an excuse we tell ourselves. Saying, “You are lucky to have made that huge sale!” ignores the reality that sales are more likely to happen when someone puts in the work to generate and follow up with leads.

    Whatever it is you want to be the best at, go out and do more of it. Take it a day at a time. Move forward in a meaningful way each day.

    It takes a lot of work. Determination won’t be enough. You’ll need to build habits and design systems that keep you on track. On the days when you are sick, didn’t sleep enough, and just don’t feel like doing it, you’ll need routines to turn to that allow you to keep moving forward.

    What you have going for you is that very few people are willing to do this. If you actually show up, push through, and ship more work than everyone else, you’ll be surprised at how much easier it is to reach those rungs above you on the ladder.

    It doesn’t matter whether you are a manual laborer, financial analyst, server at a restaurant, executive, budding author, carpenter, or musician. The path to the top is the same:

    Do more. Improve on the things that don’t work. Repeat this process every single day.

    • Build more apps. Streamline their architecture and increase your user base.
    • Write more blog posts. Tighten up the language and work on your SEO.
    • Paint more paintings. Become more efficient with your brush and find the best paint.
    • Stock more shelves. Optimize the order in which you stock items in your section.
    • Take more photos. Improve your framing and use of light.
    • Fix more cars. Repair each transmission with fewer steps. Leave your shop cleaner than it was the day before.
    • Shovel more manure. Optimize the size of each scoop to minimize the strain on your muscles. Learn the best way to fill each wheelbarrow.
    • Follow up with more leads. Figure out what language works the best and which channels they are coming from.
    • Cook more meals. Be more creative to make the most of what you have on hand. Learn how to clean as you go.
    • Brew more beer. Make each batch taste a little better than the last one.
    • Build more tables. Refine the edges and cut each board with more precision than the last.
    • Write more journal articles. Refine your arguments and provide more proof.
    • Make more sales calls. Keep improving those introductions and do more research on each lead.
    • Play more chords. Improve your timing with each play-through.
    • Market in more channels. Cut the weak ones and double down on the strong ones. Test new channels each week.
    • Run more miles. Cut one second off of your route each time you run it. that is less time than it took you to read this bullet point.
    • Wait on more tables. Improve your people skills to get more tips and repeat customers.
    • Clean more bathrooms. Become a little more efficient each day.
    • Write more content. Improve your wording, explain things better, and make it a better fit for your audience.
    • Throw more pottery. Work on your trimming precision and the steadiness of your hand.
    • Make more cocktails. Memorize the recipes, learn which tastes work well together, and work on getting your proportions right without measuring.
    • Read more books. Take better notes, read faster, and work on your retention and recall.
    • Create more videos. Work on your timing, transitions, angles, and lighting.
    • Plant more seeds. Learn which depths, soils, temperatures, and weather conditions lead to the best crop, then double down.
    • Deploy more code. Be more efficient with CPU and memory usage, minimize the number of bugs you ship, and improve your automated testing.
    • Write more songs. Improve your melodies, word play, and length.
    • Install more cabinets. Improve the fluidity of each hinge. Sand each rough edge more judiciously.

    Get the picture?

    You know what you need to do. Stop wishing you were doing it and go out and do it. The only thing standing in the way is you.

    These ideas aren’t original, but they are worth repeating. The ideas in this post came from listening to a Design Matters podcast with Seth Godin, chatting with Isaac Morehouse, watching a Gary Vaynerchuk video, talking with my Dad, and observing Derek Magill.

  • Do More. Improve on it. Repeat.