Author: Matthew

  • Installing PIP/pygame on macOS

    I recently started to learn Python, and by recently, I mean I started mostly with it today. To get familiar with Python a friend showed me a simple tic-tac-toe tutorial which I saved in to a .py file and tried to run from the terminal. After fixing an error due to a / being inserted on a line-break, all went well, mostly, with the exception of getting the package installer for Python working (pip), and also getting pygame downloaded.

    Running pip install pygame threw an error saying that pip wasn’t found.

    I was sent a command by my friend to download get-pip.py using curl. The instructions are found here.

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

    After downloading with curl you can then run:

    python get-pip.py

    This installs pip.

    When done, I had to run the following command to install pygame:

    python -m pip install pygame

    This command is obviously different to the initial pip install pygame command earlier in the tutorial, and perhaps using the command pasted just above this paragraph would have worked all along. I certainly don’t know, but either way, it works now with the commands issued above.

    Hopefully this helps you if you trip up on trying to get pygame setup.

  • Books I Want to Read in 2021

    Although I’m a strong believer in setting goals at any time of the year and not waiting till the year rolls over to the next, there’s something about the new year that brings a fresh start and a good time frame in which you can think of what you would like to accomplish and then plan the ways at how you might accomplish it.

    One goal I want to set for 2021 is to read more. I typically read a few books a year, but I know I have time to read more.

    Here are the books I would like to read or reread, in 2021. I have no idea if I will accomplish reading them all, but I do know I can make a time commitment each day and if I stick to it, I will have accomplished my goal of reading more:

    Reading Now

    Atomic Habits by James Clear: I started reading this book last week and so far I like what I have read. I think this book will fall into the category of being extremely helpful.

    Want to Read

    Essentialism by Greg McKeown: This book has some great reviews and I want to reread it this coming year.

    Getting Things Done by David Allen: I like the whole GTD methodology, but feel I need to reread this book as it’s been several years since I last read it and I’m sure I’ll learn something new as I work through it again.

    The Hidden Secrets of Money by Nathan Sloan: I purchased this book in November, although I don’t remember what triggered me to buy it. But, it’s certainly something I want to read this coming year.

    Demand Side Sales 101 by Bob Moesta: I read about this book when Jason Fried of Basecamp wrote about it on SignalVNoise. I purchased it and it’s ready to be read.

    Personality Isn’t Permanent by Benjamin Hardy, Ph.D.: This book was introduced to me by one of my software engineering instructors at BYUi when he spoke about it on his YouTube Chanel.

    They Ask, You Answer by Marcus Sheridan: Another interesting book about answering the questions your customers have.

    Grit: The Power of Passion and Perseverance by Angela Duckworth: I’m not sure what to expect with this, or in other words, I ordered it a while back and cannot remember why. I like the idea of passion and perseverance though and am sure it will learn a lot from it.

    1984 by George Orwell: This is different from what I would normally read, but a good friend recommended it to me recently.

    Change by Design by Tim Brown: I saw the term “Design Thinking” and wanted to read more about it, so I purchased the book.

    The Four Dilemmas of the CEO by Tom Biesinger, Ross Wall, and Clifford Herbertson: I met Tom back in the late ’90s, and also know Clifford Herbertson and some of his family, so I purchased the book. I have no idea what to expect, but looking forward to reading the book.

    Big Ideas… For Small Businesses by John Lamerton: I run a small business, so purchased this because of a review I read somewhere that recommended it.

    Routine Machine by John Lamerton: As this book and the last are next to each other in my Kindle library, it seems I purchased them together. Another one I am looking forwards to reading.

    ReWork by Jason Fried and David Heinemeier Hansson: I like the work that the people of Basecamp create. I use Basecamp for some of my own projects and like some of the thoughts that they share on SignalVNoise. I write software for work and think I will benefit from reading this book.

    Remote by Jason Fried and David Heinemeier Hansson: Another book by the people of Basecamp, this time about working remotely (which I have been doing since about 2012). It will be good to read their ideas on working remotely.

    4 Disciplines of Execution by Sean Covey, Chris McChesney, and Jim Huling: This was recommended to me at a place where I did some work earlier in 2020. I never completed the book but would like to do so in 2021.

    Designed to Stick by Rick Jesse: I don’t know when I purchased this book, but because it’s about small business and starting up, it’s on my list.

    It Doesn’t Have to Be Crazy at Work by Jason Fried and David Heinemeier Hansson: I really like the thoughts behind this book. Lots of startups seem to think that you need to put in double or triple hours each week to be successful, but Jason and David teach here that it doesn’t have to be this way. Or at least that is what I think it is about.

    Six Memos for the Next Millennium by Italo Calvino: I have no idea what to expect with this one, but I’ll give it a try.

    The Daily Stoic by Ryan Holiday and Stephen Hanselman: If I remember correctly, this book is meant to be read a little bit each day. I’ll begin on Friday 1st Jan 2021 and see how it goes.

    How Will You Measure Your Life? By James Allworth, Karen Dilon, and Clayton Christensen: I think many people want to know how to lead a fulfilling life, which is what the description mentions at Amazon. I am familiar with some of Clayton’s books, so would like to read this one.

    Why We Sleep by Matthew Walker: I don’t get enough sleep and would like to learn about what problems that can cause in my life. I hope this book answers those questions.

    The Immortal Life of Henrietta Lacks by Rebecca Skloot: One of my instructors at BYUi recommended this book to students in the class, so I ordered it.

    Man’s Search For Meaning by Viktor E. Frankl: A friend sent me this book as a gift when I left the hospital several weeks ago. I’m looking forwards to reading this one. It will probably be the second book I read this year.

    I am about one-third of my way through the list of books and will add more over the coming days. Perhaps I am being optimistic about what I will read this coming year, but as mentioned earlier, I will measure my success by how much time I spend reading each day, and even more so by the way it may or may not change how I think and act.

  • Amazon Eero Review

    After spending a lot of 2020 on Zoom meetings with choppy audio and frequent freezes, I decided it was time to upgrade my home wireless network.

    I began frequently using Zoom in December 2019 when doing some work for a company where all staff worked remotely (we were ahead of the curve). Noticing connection problems while in meetings I spoke to my ISP and managed to get a free upgrade to the Virgin SuperHub 3. Although this improved reliability a little, things were still rough. I would often spend a lot of the day at home with wireless disabled on my phone just because the wireless connection was so bad. Zoom meetings also carried on suffering, although a little less than before. Annoyingly, it was always when I needed to listen or speak the most.

    Looking up the numbers it seems that the SuperHub 3 is capable of handling about 20 wireless devices at a time. Although that seems like a lot for a home, it really isn’t now that our home is filled with more people and devices. Just to give a brief summary of some of our home devices:

    1 x Ring doorbell.
    1 x Ring Floodlight cam.
    2 x Apple MacBooks
    1 x Apple iMac
    3 x Amazon Alexa
    2 x Amazon Fire TV
    1 x Apple TV
    2 x Apple iPad
    2 x Apple Watch
    1 x FitBit Versa 2
    7 x Smartphones (Several in the home, some for testing iOS apps which I build)
    1 x HP Wireless Printer
    ? x other devices that I can’t remember.

    All of these are active, although not always in use. But, it’s enough wireless traffic to bring the SuperHub 3 to its knees. I don’t think the SuperHub 3 is designed for this many devices, particularly with all of the streaming from multiple devices as well as cameras that upload video on movement. To compare to Eero, these devices can handle up to 128 connection each.

    After a bit of research I opted to try the Amazon Eero. I managed to get a deal on the week leading up to Black Friday although since then it has gone back up in price. I got the three Eero pack, but not the pro version as those are more than I’m willing to pay at the moment.

    Setup

    Setup was easy. I wont go in to all of the steps in the app, but we ran in to no problems with setting things up. Due to an injury and not being able to get around the house easily, two of my children plugged the Eero devices in, one on each of the three floors we live in, and then connected the downstairs one up to the Virgin router. I put the Virgin router in modem mode and when done, opened up the Eero app and added each Eero to the network. The only remaining task was to check for devices on my old 5G network and change the wireless settings for them to point them to the new SSID.

    As I was unable to get around the house at that time, my son took my phone around the house and used the SpeedTest app to check what kind of speeds we were getting. On my old setup which used TP Powerline adapters I was reaching around 10 Mb down at the furthest point in the house. Using Eero I typically get up to the full 220+ Mb from anywhere in the house depending on the time of day. Virgin has typically been good at providing advertised speeds for me, so I am happy with the results. I just couldn’t use the wireless from their standard hub.

    Eero Reliability

    Reliability has been great. Eero was setup just over a month ago. The first outage took me by surprise as it had been reliable for a few days after installation, but then I read that Amazon AWS had a major outage knocking out a lot of the internet. This meant that Eero was actually not the problem itself and that the problem was external to my network.

    The other two outages seemed related to Zoom and I never was able to get to the bottom of what happened because when in a middle of a meeting the aim is to get back in as quick as possible, unless it’s boring and you have a valid excuse for leaving. I was kicked out of two meetings briefly and had to disconnect and reconnect. Perhaps it was my wireless network or perhaps it was something external, but other than that, all has run exceptionally well since installing it.

    Eero Review Summary

    This post is just a summary of what Eero has worked like in my home; a kind of mini-review. I’m happy with Eero and the greater reliability it brings to my home. I haven’t got exact facts and numbers to share because they are not so important to me, but what I do know is that Zoom meetings are far more reliable and I rarely lose connection.

    I also am able to use wireless on my phone and not have to disconnect and use 3G/4G in the home like previously.

    Pros

    • Reliable and a steady and strong signal all around the home. I could probably get away with using two Eeros, but the pack of three was a good price.
    • The iOS app works great and lets you know what the best throughput you are getting, how much data you use each day, and lets you create guest networks, use experimental features, set custom DNS (which I really like) to name a few things.
    • The iOS app is updated regularly. There have been several updates since I downloaded the app.
    • The Eero devices themselves also get updates to improve service.

    Cons

    • When my ISP went down recently I couldn’t connect to Eero through the app to troubleshoot. To restart Eero you need an active internet connection. Not knowing it was my ISP at the time I didn’t know if Eero was the one with the problem or not. It turns out it was the ISP which was fixed an hour later.

    Pricing

    • At review time, the price is £249. – UK: Link US: Link (The US link is for the search page for Eero as the options are a little different).
  • 1Password Update Includes Ability to Unlock with Apple Watch

    I have been a user of 1Password for several years now. I use the personal subscription on it which is something in the region of $36/year. I have four vaults with 560 passwords/logins/bank details, etc… stored. I use it every day on my iPhone, iPad, and MacBook Pro and it has proved invaluable for storing complex passwords that are unique for every website I visit.

    1Password updated 1Password this week. I typically don’t bother paying attention to updates because I find them mostly uninteresting. I’m not saying the updates are not good, but I just typically don’t read what is new and I just use 1Password as I always have used it.

    I accidentally stumbled upon one new item in the latest 7.7 update that launched this week that said there is now an option on the Mac to unlock 1Password with an Apple Watch. As an Apple Watch user I appreciate my MacBook unlocking automatically almost every time I wear my Apple Watch. This feature intrigued me.

    The 7.7 update arrived on the App Store for me this morning, so I quickly updated to test and see how the feature worked. Enabling it was quite simple. Open up the preferences, select security, and then check the Apple Watch box in the “Unlock using” section at the top.

    I manually locked 1Password and then opened it. My watch made the familiar clicking noise that sounds when you log in to the Mac. Rather than automatically allow me access to 1Password on my Mac, I was notified on my watch to double click the bottom button. After doing that, 1Password opened.

    The downside is the double click on the Watch button. Reaching over to use Touch ID is a little quicker for me, and I’ll probably carry on using that method. I don’t use an external keyboard for my MacBook at the moment, but I plan on doing so sometime next year when I renovate my home office. At that point I believe Unlock with Apple Watch will become a more useful option for me given that I wont have easy access to Touch ID if opt for a dock that requires my MacBook to be closed.

    What I do like is that both Unlock with Touch ID and Unlock with Apple Watch work simultaneously. Even though my watch clicks to indicate I can use it to unlock 1Password, I can still just use Touch ID if it is the most convenient option at the time.

    I do look forwards to other apps implementing this feature including DayOne and anything else I like to keep behind security.

  • Amazon Eero Ordered

    With my home gaining more and more wireless devices as time goes on, I decided today to order the Amazon Eero to test and see how it performs around my house.

    I currently use the Virgin Media Super Hub 3 and although it performs better than the previous model I had, it’s becoming more apparent that it’s struggling to keep up with all the wireless devices that we connect to it.

    Wireless devices include multiple laptops, a desktop, several phones, watches, security cameras, several Amazon Echos, a couple of Fire TVs, an Apple TV, and probably other devices that I cannot think of right now.

    Virgin state that Super Hub 3 can handle more than 20 devices, but it’s becoming clear that with all the streaming of movies, cameras, as well as many Zoom meetings this year, that it just can’t handle the traffic we push through it day to day.

    I’m looking forwards to testing the Amazon Eero when it arrives tomorrow. According to the stats, each device can handle up to 128 connected devices. It is recommended to keep the number of devices to 30 per Eero if streaming is being used, but as our devices are spread around three floors in our home, this limitation should be OK for us for some time to come as some streaming devices will be connected to a different Eero than another streaming device.

    With Amazon starting their Black Friday deals recently, I managed to pick up a pack of three Eero’s for £149.40.

    I’ll be testing over the weekend to see how they perform and will write up my findings and let you know if I can recommend it or not. My recommendation criteria is getting a good upload and download speed from any location in the house where the internet is used. My office, for example, is at the top of the house and signal is very weak and often drops. My download speed is typically around 220Mbps under perfect conditions, but right now on just one floor up it has dropped all the way down to 5Mbps. It sometimes isn’t that bad, but right now it just seems the network is overwhelmed.

  • DevFright.com 2012 – 2018 Report

    DevFright.com began life as CodePath.org back in December 2012. I started it with the intention of keeping notes of the things I was learning when I started to learn how to program at the beginning of that same year. After a few months, I changed codepath.org to devfright.com and also moved the content over as well, and after that, the owners of codepath.com asked if they could buy the .org domain from me. I agreed to the sale. I’m glad they were able to put it to good use.

    Traffic started flowing to the site with December having 277 page views, according to Google Analytics. It then tapered off to its lowest of 77 in February 2013. It picked up again in March with 325 page views and until July that year it was around the 225 mark for each month with the exception of July increasing to 484 page views.

    Just to show how many tutorials were posted, here is a brief overview:

    • December 2012: 6 Posts.
    • January 2013: 1 Post.
    • February 2013: 0 Posts.
    • March 2013: 8 Posts.
    • April 2013: 4 Posts.
    • May 2013: 0 Posts.
    • June 2013: 0 Posts.
    • July 2013: 1 Post.

    In August, traffic picked up again. There were 910 page views that month, and a lot more content added.

    • August 2013: 13 Posts

    Coming from a background of writing content on websites from 2006, I know that just a few posts a month usually doesn’t cut it, particularly in the tech field. I was surprised that July ended up doing as it did with 2 months prior having zero posts, and only doing 1 post in July with was published on the 18th of that month. But it seems that Google had noticed the site, and a few of the posts were starting to rank better in July. Perhaps some sites had linked to it at this point, and helped increase the ranking in the process of that.

    Rather than explain the remaining months in detail, the rest of the year ended up doing great. The first 7 months, as seen above, looks almost insignificant with the growth of traffic to DevFright.com in the latter months of the year. December 2013 ended up with 23,636 page views.

    What I will say is that the momentum of writing tutorials didn’t continue. The rise in traffic was due to my work earlier in the year, and particularly in August where the most posts were made. After that, the post cadence dropped significantly, and traffic started to die down. Lesson learned: To keep traffic, you need to keep creating content.

    In 2014, I published just 15 posts, 7 of those posted by another writer and great iOS developer I collaborated on a few projects with. Despite few posts that year, traffic was generally OK, although it peaked around match and started to slowly taper off.

    Lets fast forward to today:

    Although I made some efforts in creating content, I typically did not keep up a steady rhythm, and traffic dropped. Content started to grow old. I did begin to update some, and particularly created Swift equivalents after that was introduced by Apple.

    As studies are slowing down over the next few weeks, and as I have learned a lot more since starting DevFright; such as creating several apps for other people, and also learning how to create Android apps; I have lots to write about. My goal for 2019 is to keep a steady flow of content to see if I can reach the peak level again which was in March 2014 where pages were viewed 31,525 times that month.

    I quite like the transparency of Eugen for his Baeldung.com website where he regularly blogs about traffic and numbers, so I decided to follow his lead, and also post updates. At the moment, I am going to post monthly updates, and if the site takes up too much of my time, I’ll drop to quarterly or semi-annual reports.

    Costs to Run DevFright.com

    Web Hosting

    For web hosting, I was a WebSynthesis user for a few years until they recently sold to WP Engine. I pay $35/month for hosting there. I have decided to stay with WP Engine* until my traffic get to higher levels when I will evaluate if I should stay. So far the site speed has been excellent, and the service has also been excellent, so I think I’ll probably continue on. I’ll address that when the time comes though. I’ve moved plenty of websites around before, and even managed a hosting company some time ago, so am familiar with moving sites around, particularly WordPress based sites.

    I have considered other options. This website, matthewnewill.com, is built using Jekyll, and hosted on Github pages. Although DevFright wouldn’t be suitable for GitHub pages (from my understanding of the terms of service), I could easily spin up a Digital Ocean server for $5/month and move a static version of the site to there; or alternatively, just use DO with a WordPress install on it. I might consider that in a month or so if traffic doesn’t begin to increase.

    What I do like about managed WordPress hosting is that I can leave the headaches to the hosting company. I can focus my time on creating content, rather than tracking down a hack of some-sort, or an issue with performance. When I last ran a large website, it had around 1,000,000 page views per month and sometimes I had to spend most of a day tracking down issues. I started to like the managed portion where I could focus on the content.

    Email

    I was using AWeber for several years, and they worked great, but because I had slowed down the content creation, and stopped using them for other sites, I decided to move from the $29/month fee at AWeber ($19 for 1,000 emails, and then $10 for anything over 1,000 to the next tier).

    Instead, I switched to mailchimp (I’m on the free plan), although if traffic and subscribers build up to decent levels, I may consider switching to ConvertKit as it looks very interesting to me.

    Numbers wise, there are currently 1,074 (including me) subscribers to the DevFright mailing list, although I haven’t actively promoted that for a few years now, so many of those might unsubscribe when I start sending out emails again. Thinking about it, the only opt-in form on DevFright probably still links to AWeber. I best check that out.

    Monthly Reporting

    I will be posting again in the new year to show December 2018 numbers. Right now, they look to be similar to November. From 1 to 19 Nov there were 3,218 page views, and for the 1 to 19 Dec there were 3,250. I will see if several new posts to the site can help increase traffic, although history has taught that fresh content, particularly when added to a site that doesn’t get regularly updated, takes some time to be picked up. However, what I work on now should yield more traffic over the coming months and years.

  • iPhone WiFi Issues on iOS 11.4.1 with a Virgin SuperHub 2

    Since updating my iPhone 6, and an iPhone SE to iOS 11.4.1, I’ve seen many disconnections from my wireless network at home. I’m running a Virgin SuperHub 2. After checking the config on that device, as well as the WiFi extender, I figured it was time to call Virgin to see if they could look in to the issue. However, I held back because my iPad Pro running iOS 12 beta, and my MacBook Pro running Mojave beta were both working just fine.

    I realised this evening that perhaps iOS was the issue. I updated my iPhone 6 to iOS 12 GM, and the iPhone SE to the same, and so far, there have been no disconnects from the network.

    iOS 12 ships in a few days on September 17th, so if you’ve been having problems then it should correct itself in a few days if you update. Alternatively, you can register for a free developer account and download the latest beta which is very stable.

  • How to Host a Jekyll Site on Amazon S3 and CloudFront

    This post is part of a series. You can find the previous parts about setting up Jekyll, transferring a domain name from Godaddy to Amazon Route 53, and how to theme a Jekyll site.

    If you have followed along from the earlier posts you will have a website running locally using Jekyll. You will also have themed your website to make it look like you want it. The next step is to push the website to a web host so that the world can see it. Note that this series of tutorials is for those with a fairly new blog who are not interested in matching permalinks to a previous website. If you need to 301 content and have more friendly URL’s then more configuration is needed on Jekyll. I won’t cover this here just yet, but might in the near future.

    In this guide I intend to show you how I deployed a static website on Amazon and enabled my domain name to be used on it. Because we only deal with html and Javascript, we can use the basic S3 static website hosting from Amazon Web Services.

    Why Amazon?

    The reason I selected Amazon was because of using many other hosts in the past such as MediaTemple (where this site was prior to the move to Amazon), WebSynthesis (where my DevFright.com blog is), PowerVPS, RackSpace, Rochen, Blue Host, Host Gator, Linode, Digital Ocean to name a few. I wanted to try Amazon so I could see first hand how that performed. I was also intrigued on how they charge for hosting there. Unlike a mostly flat fee of the ones mentioned above, I wanted to see what it actually costs to run a blog when I pay for what I use rather than pay up front.

    One thing to note as well is that I have all my blog content locally, and can switch hosting providers within an hour if needed.

    Setting up a Website on Amazon

    Amazon makes it really simple to setup a website with them. To do this, visit Amazon Web Services and login with your Amazon account (or create an account if you don’t use Amazon). When logged in you will see an option in the "Build a solution" section called "Host a static website". Select this option as below:

    Click on the + New website button. You can’t miss it.

    Give your website a name. I just put mine as Matthew Newill Blog. I opted for the example website and then clicked "Create Website".

    The website is set up and you are given a sub domain to use. Of course, you might and probably will want to use your own domain. Lets set that up next. If you are running a live blog and don’t want any downtime I suggest you do this step last and just work with the provided sub domain until you are happy that everything is set up as you want it.

    Transferring a Domain to Route 53

    I transferred my domain name from Godaddy to Route 53. To do this I first needed to unlock the domain at Godaddy so that a transfer request could be made. You do this by logging in to GoDaddy and then going to the option to manage your domains. You then select your domain (the checkbox next to it) and at the top you’ll see a "Lock" button. Click on this and switch the lock off.

    Then select the domain name so you can see its details. In that screen scroll to the bottom and select "Email my code" next to the Authorisation Code heading. A code will be sent to you. Hold on to this.

    Log in to AWS and go to Route 53. Select the option (link just above where you register a domain) and click "Transfer your existing domains". If you have unlocked your domain you should be able to just proceed to transfer to Route 53. At some point you need your authorisation code. To speed up the transfer, this is what I did on Godaddy.

    When the transfer is completed (it may take a few days if you are unable to speed up the process as above) then go back to the website you just created on the previous step. Click on "Buy Domain" and on the next screen, choose an existing domain. Click on "Associate Domain".

    At this point, you need to wait about 15 minutes for the process to complete which associates your domain with your website.

    Configure the Content Delivery Network

    Now that you can load up your empty website in the browser on your own domain name, lets take at look at configuring CloudFront. To do that, click on "Manage settings in Amazon CloudFront".

    In the general tab I clicked Edit and then added my domain name to the "Alternate Domain Names (CNAMEs) section. I also switched to HTTP/2, HTTP/1.1, HTTP/1.0.

    When done, CloudFront is ready although you can make other alterations as needed. For example, I created an SSL certificate and added that in the CloudFront general settings tab.

    Transferring Your Jekyll Site to Amazon

    At this point, you could build your Jekyll site and then upload the site folder in to Amazon S3. Thankfully though, someone has created a tool that can push your site to S3 by issuing a terminal command. The setup takes a few minutes, but once done, you just need the command "s3_website push" to push any changed content to Amazon S3.

    Lets set everything up. Open terminal and get to the root of your Jekyll install. Install with:

    gem install s3_website

    You need to generate the config file next. Do that by issuing the following command:

    s3_website cfg create

    A new file called s3_website.yml will appear at the root of your Jekyll install. Open this in your text editor of choice.

    At the top you will see some items that need configuring such as the S3 ID, secret, bucket and cloud front distribution. This information acts somewhat like (but not really like) a username and password so that it can get content in to your S3 bucket. It also highlights where to put that information. If you generate an id and secret that is granted access to the bucket and CloudFront distribution, then s3_website will be able to upload your content.

    To get this information, visit the aws console and login. Search for IAM and load it up.

    On the left sidebar, select Users and then click the blue button called Add user.

    Provide a username, and then select "programmatic access".

    Click Next to get to the permissions.

    Select "Attach existing policies directly".

    Search for AmazonS3FullAccess and add it. Then search for CloudFront and add CloudFrontFullAccess. Be warned here that this gives this particular user access to all S3 buckets and the CloudFront console. For me, this is OK right now because this is all I have in my account, but please do be careful when granting access here.

    Copy the Access key ID in to the s3_website.yml file and then copy the secret access key in to the same file.

    Go back to the main view in the AWS console and load up S3. Here, you need to find your S3 bucket name for your website. It will be in the format of: awe-website-yourfriendlyname-xxxxx

    Paste that in to the config file.

    Finally, you need the CloudFront distribution ID. You get this by going to your static website settings, selecting your site, clicking "Manage settings in Amazon CloudFront" and then at the top of the page you will see:

    CloudFront Distributions > EXXXXXXXXXXXXXX

    Save the config file.

    In the terminal run the following command:

    s3_website cfg apply

    If all OK, read on to find instruction on how to push the website to Amazon.

    Uploading Your Website

    Now that everything is confirmed and validated as working, it’s time to issue the correct comments.

    Issue:

    jekyll build

    Check for errors. If all OK, issue:

    s3_website push

    Wait a few moments and when complete, load up your website at yourdomain in the browser to see if all works. If so, well done! You now have a fully working Jekyll install that you can push to the internet.

    Each time you write a new post you need to build it and then push it. If you are more wise than I am, you might also want to test the site locally before pushing to ensure that all works well.

  • Changing the Theme on Jekyll

    Since starting to using Jekyll on this blog I have been using the standard built in theme. If you have visited before you will have seen the blog looked like this:

    The standard theme isn’t quite what I want this blog to look like. I personally prefer a few posts on the home page with full content enabled. I may at some point use the equivalent of the "more" tag so I can put an excerpt on the home page and then link to the full material, but for now I want to stick with the full content on the main page.

    To make the change I needed to install a new theme. This is the first time I’ve used Jekyll, so I was also new at installing themes.

    After a brief search around the Jekyll theme library I came across a theme called Lanyon. This is the one that I decided to modify and use.

    How to Switch Theme on Jekyll

    Before you begin, I suggest making a backup of your Jekyll folder. I used Git and committed everything before messing with the theme, that way I could switch back to where I was if needed. You might opt to simply make a copy of the folder. I’ll leave that up to you. However, in the next post I will show how I use Git and GitHub for version control on the site.

    Installing the theme was fairly simple. I ran in to an issue with pagination, but also found the fix after some searching around. Here’s how I installed it:

    I downloaded the Lanyon theme, extracted the contents and then folder by folder and file by file I pasted everything in to my Jekyll install being careful not to overwrite anything (such as the _posts folder… do not overwrite your own blog content).

    I deleted index.md (the original index file) as there was an index.html file included with Lanyon.

    The next step is to edit the config file. I commented out the old theme and added the following:

    # theme: minima
    gems:

    • jekyll-feed
    • jekyll-sitemap
      gems: [jekyll-paginate-v2]

    pagination:
    enabled: true
    per_page: 5
    collection: ‘posts’
    limit: 0
    sort_reverse: true
    sort_field: ‘date’

    Here I specified jekyll-paginate-v2 as one of the gems to be used. Note that I used v2 as I had problems with jekyll-paginate. From my understanding, jekyll-paginate development has been discontinued. V2 seems to build on the original.

    Next, I set the pagination options. I set enabled to true, per_page to 5 on "posts" only. The limit of 0 I believe means that all posts on my index.html page will be paginated and it won’t restrict it to the first XX amount of posts for example.

    The sort_reverse had me confused. I expected it to be needed as false, but for me the correct order was true. I also specified the sort_field to be based on the date of the post. You can sort by others such as title, author, and others if needed.

    After getting the main config file ready I also needed to add the following to the gemfile file:

    gem "jekyll-paginate-v2"

    You can now build your site and run it on the local test server on localhost:4000 as follows:

    jekyll build
    bundle exec jekyll serve

    At this point you should see the Lanyon theme with your own content (assuming you didn’t wipe out your _posts folder).

    Customising Lanyon

    I made a few more tweaks to make it my own. I’m not particularly interested in the slide out menu from the side. Instead, I’ll add a single nav bar below my name which will run the width of the page. To remove the sidebar I modified default.html found in the _layouts folder. I also made some tweaks to the _includes folder as well as the other files in _layouts just to get the site looking the way I wanted.

    After removing a few items I managed to get the site to look as I want it. I built the site and all looked good.

    Next Steps

    The next step is to move the blog to the internet for hosting. I chose Amazon to host the site and will go in to details of how I set that up in the next post.

  • How to Speed up the Domain Transfer from Godaddy to Another Domain Registrar

    Yesterday I started the process to move matthewnewill.com from Godaddy to Amazon Route 53. I went through the process of unlocking the domain at Godaddy, getting an authorisation code from them, and then starting the transfer steps in Route 53. All went fairly smoothly (except a billing issue where my card had just expired a few days ago).

    When the billing issue was resolved (only took a few minutes), the transfer proceeded to step 7 in Amazon which is Waiting for the current registrar to complete the transfer (step 7 of 14). Godaddy sent an email yesterday saying:

    If you wish to cancel, or did not request this transfer, log in to your account before 09 January 2017 by clicking the button below to decline the transfer.

    I wanted things to go quicker than the 9th January, so I did some Google searches and found a tip that suggested you go in to Godaddy and accept the transfer manually. I did that and about 2 minutes later I got an email from Amazon saying the domain transfer was complete.

    How to Manually Approve a Domain Transfer in Godaddy

    To manually approve a domain transfer in Godaddy you login, go to Manage My Domains. At the top left, click on Domains and then Transfers.

    You should see your domain name listed under "Pending Transfers Out". Click the checkmark, and then click on the Accept/Decline button. Select the correct option to accept the transfer.

    What Next?

    Just wait. When you complete this step in Godaddy it expedites the domain transfer. The instructions I read indicated it could be about 24 hours before it happens which is far better than waiting a few days. However, for me it was just a couple of minutes.