Blog

  • Somewhere along the Alaska Railroad

    Picture from taken during our ride from Seward to Anchorage on the Alaska Railroad. The service was on the AR was great.

  • A Book: The World in a Grain: The Story of Sand and How It Transformed Civilization

    My wife and I went on vacation last week and I took a few books along (via my Kindle). One of them was ‘The World in a Grain: The Story of Sand and How It Transformed Civilization’. Quite good and a bit scary. I had no idea that the use of sand was so critical to so many things. Well, I knew about concrete, asphalt and silicone but damn…

  • Backing up my web sites using Transmit

    After 5 years (!?) I thought I would automate the backing up of my (very simple) web sites.

    I’ve been using Interarchy for a very long time but I thought I would use Transmit to do this.

    A few caveats to get started:

    1. What I’m actually doing is synchronizing the remote site to the local location
    2. That means that I started Transmit and added a Favorite to the app represents the top level of the FTP location
    3. Most of the script comes from Panic samples called ‘Transmit 4 AppleScript samples’. I added a few lines to set the AppleScript timeout and loop through the sites
    4. This is an AppleScript. I’ll probably convert it to Javascript at some point.

    I’ve included the script below.

    Once I got the script running the way I wanted it to I saved the script as an ‘Application’.

    I then went over to Automator and created a “Calendar Alarm” item. I used the ‘Run Application’ event and selected my Script application. Hit save and Calendar will fire up and an event will be created. Note that event creation will trigger the script attached to it. Wish it didn’t do that but whatever. One other thing to mention is that the Calendar that is created is local to the machine where you used Automator to create the Calendar Alarm.

    Set the schedule for the event and you are done. The next time the event date/time hits the Script application will fire and bam… your files will be backed up.

    There are a lot of tweaks that the script could use that I will add as time goes on.

    Also note that you need follow through on other steps to make sure that the data is good such as restoring the data, checking its ok, etc, etc.

    Now… to back up those MySQL databases!

    Here’s the script:

    — Connect to FTP Server and sync remote directories to local directories
    — 2010 Panic Inc.
    — Mild modifications made by JAG, 2018

    [sourcecode language=”plain”]

    tell application "Transmit"
    with timeout of (15 * 60) seconds
    activate
    tell application "Transmit"
    — Prevent interactive alerts from popping up during script execution
    set SuppressAppleScriptAlerts to true

    — Set some variables to values to be used later in the script
    set myFTPServer to item 1 of (favorites whose name is “NameOfYourFTPLocation")
    set pathToMainBackupDirectory to "/Volumes/Drobo/Backups – Web Sites/"
    set listOfSites to {“directory_1", “directory_2", “directory_3"}

    — Start working with Transmit
    — Loop through the list of sites, change the remote and local browser path and sync
    — the remote site to the local site
    repeat with a from 1 to length of listOfSites
    set theCurrentSiteListItem to item a of listOfSites
    tell current tab of (make new document at end)
    — Connect to the FTP Server
    connect to myFTPServer

    — Change the path for the remote browser to correct path on the FTP server
    change location of remote browser to path theCurrentSiteListItem

    — Chagne the path for the local browser to location of the backup
    change location of local browser to path "/Volumes/Drobo/Backups – Web Sites/" & theCurrentSiteListItem as string

    — Tell Transmit 5 to sychronize the remote location to the local location
    synchronize remote browser to local browser

    — Close the remote browser window
    close remote browser
    end tell
    end repeat
    set SuppressAppleScriptAlerts to false
    end tell
    end timeout
    end tell

    [/sourcecode]

  • Owl at Cooley Lake

    Not the greatest picture but this is the first time I’ve seen an Owl out here. Lots of red-tailed hawks.

    I just happened to catch him (her?) flying out the corner of my eye. 

    Owl at Cooley Lake

  • Emmett the cat in the sun

    This is a pic of Emmett the cat sitting in a sunbeam. He’s a pretty cool dude.

    Emmett in the Sun

  • 7 ancient ruins around the world, reconstructed

    Check this out over at Expedia. Very cool. Via Kottke.

  • MacStories overview of iOS apps

    I’ve had this article, “My Must-Have iOS Apps, 2017 Edition”, on my to read list for awhile now. Long one but worth every moment. Gave me some ideas to think about on how to change my workflow. 

  • Homebuilt bookshelf

    Been working all summer to get my garage and shed organized. Projects started but not finished abound! Trying to get them  finished one by one. 

    Here’s one of the projects. I thought this was my first bit of furniture but it’s the second.

    It was an interesting piece to build. The supports are L angle steel hit with a grinding wheel and lacquered. The shelves are 2×6 pine stained very lightly, hit with a torch to bring out the grain and coated with poly-acrylic to provide a bit of protection. 

    IMG 4763

  • St. Louis, MI – Geographic Center

    Was visiting family and on the way back decided to hit the One Nation Brewery in Williamston, MI as I had never tried their M43 IPA (delicious by the way). 

    Passed through St. Louis, MI on the way there. Geographic center of Michigan. 

     

    IMG 4778

  • Minneapolis: State Fair, Ren Fest and Grain Belt

    Spent some time last week in Minneapolis. Went to the State Fair, Paisley Park and the Ren Fest. 

    Good time was had. Also tried Grain Belt. Pretty good, drinkable beer. Below is a pic of the famous ‘Grain Belt’ sign in Minneapolis.

    Grain Belt Sign 2014 320x480