A blog probably of interest only to nerds by John Morton.

23Apr2018

Set­ting up local plu­g­in devel­op­ment for Craft 3

When I start plu­g­in devel­op­ment I use a direc­to­ry on my Mac call local-plu­g­ins” to store my plu­g­in files while I ini­tial­ly work on them. For exam­ple as I write this I’m work­ing on a Twig fil­ter for this site called video-embed-fil­ter”. Here’s my process for set­ting up my dev envi­ron­ment in detail. First thing I do is use Plu­g­in Fac­to­ry to scaf­fold out a the basic plu­g­in struc­ture I need. I then just unzip… + read on


21Mar2018

Using alias­es on the com­mand line.

If you use the com­mand line and you’re lazy, this is for you. I’ve picked up a lot of tips in cus­tomz­ing my com­mand line over the course of many years. Most of them I aban­don after the new” wears off, but a few stick around. Specif­i­cal­ly, I have some alias­es that I find use­ful enough that they’re part of the set up process when I get a new Mac. (Yes, these are Mac spe­cif­ic… + read on


15Mar2018

A Check­list for the Craft Plu­g­in Store

Like many of my posts here, this is anoth­er note to myself to help me when I have ques­tions about get­ting things done. I recent­ly fin­ished Pic Puller for Craft 3, avail­able in fin­er Craft 3 plu­g­in stores every­where. But the point of this post is how it actu­al­ly got there. The con­ver­sion of the plu­g­in from its Craft 2-com­pat­i­ble ver­sion to Craft 3 was the first step of the process. Andrew Welch’s Plug​in​fac​to​ry​.io real­ly… + read on


24Feb2018

An S3 buck­et pol­i­cy to allow full-access for a sin­gle bucket.

When I have a new project that requires some Ama­zon S3 stor­age, I try to do the right thing” for secu­ri­ty by cre­at­ing a new user and a new buck­et entire­ly. I don’t want to share any cre­den­tials across projects. That means after I have cre­at­ed my S3 buck­et I neeed to assign a user with the appro­pri­ate per­mis­sions. For me, that typ­i­cal­ly means I want this new user to have full access to man­age… + read on


09Feb2018

Keep­ing up with the Insta­gram API

On Jan­u­ary 30, 2018, Insta­gram post­ed a dep­re­ca­tion notice for The Insta­gram API Plat­form. There is a new­er API called the Insta­gram Graph API. The new­er API’s focus is for busi­ness­es, not indi­vid­ual accounts though. This is the 2nd major change made to the API. The first major change was in Novem­ber 2015. If you’re curi­ous, here’s the announc­ment. The changes intro­duced a new app review process and lim­it­ed 3rd par­ty access… + read on


    27Sep2017

    A Check­list When Tran­si­tion­ing from MAMP to Valet

    I have used MAMP for local devel­op­ment for a long time. Sev­er­al peo­ple I know through the Craft CMS Slack group have pro­fessed the ben­e­fits of [Lar­avel Valet](https://laravel.com/docs/5.5/valet Lar­avel Valet doc­u­men­ta­tion’) so I decid­ed to give it a spin as an alter­na­tive to MAMP. When it comes to Craft CMS there is a built-in dri­ver that allows Valet to serve a Craft site with­out any addi­tion­al con­fig­u­ra­tion. You just place your Craft site in the… + read on


    17Aug2017

    Extract­ing a YouTube ID from a URL with Twig

    I had a client who want­ed to embed YouTube videos in their Craft CMS site. It would have been eas­i­est for me to have them only include the YouTube video ID but the shar­ing box on YouTube gives you a full YouTube URL. You can see that URL in the image at the begin­ning of this post. I didn’t want to add any plug-ins to my Craft CMS site to do this so I decid­ed… + read on


    15Aug2017

    Detect­ing and debug­ging the Insta­gram in-app browser

    I had to debug an issue with a site I built when client/​friend dis­cov­ered that the menu tog­gle icon dis­ap­peared only when vis­it­ing her site from with­in Insta­gram, specif­i­cal­ly, on her bio page where she has a link to her site. Being an in-app brows­er with­in an appli­ca­tion I have no con­trol of, I strug­gled to debug this prob­lem. The user­A­gent” string, as shown in the image above helped me out. I used the fol­low­ing… + read on


    09Aug2017

    How to re-add Github key to a server

    Note to self: Don’t erase your knownhosts file. (head­slap!) I pro­vi­sion servers with Lar­avel Forge and messed up my deploy­ment from Github recent­ly. I was mess­ing around in the .ssh fold­er on my serv­er and delet­ed the known_hosts file. The next time I tried to deploy my code base from Github though, I got the fol­low­ing error. Host key verification failed. fatal: Could not read from remote repository. I need­ed to get my… + read on


      12Dec2016

      Craft CMS: A big­ger Plain Text” field.

      I inher­it­ed a Craft CMS site that I now main­tain for a new client. When you inher­it oth­er people’s code, you need to see the project from their POV to get an under­stand­ing of they see things work­ing. Luck­i­ly Craft seems to encour­age log­i­cal struc­tures being built so I’ve not had too much trou­ble get­ting up to speed on this site. One of the prob­lems I did run into was with a sim­ple Plain Text… + read on