⏳ 2 min read.
Update apnea: the temporary cessation of breath when updating Craft and Craft plugins.
This article describes the steps I follow to update Craft 3.5.x and plugins in a stress-free and reliable manner. 🧘
Photo by Harli Marten on Unsplash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Prefix | Description | Notes | |
|---|---|---|---|
| ac_ | Platform Client ID | Identifier for an auth code/client id. | |
| acct_ | Account ID | Identifier for an Account object. | |
| aliacc_ | Alipay Account ID | Identifier for an Alipay account. | |
| ba_ | Bank Account ID | Identifier for a Bank Account object. | |
| btok_ | Bank Token ID | Identifier for a Bank Token object. | |
| card_ | Card ID | Identifier for a Card object. | |
| cbtxn_ | Customer Balance Transaction ID | Identifier for a Customer Balance Transaction object. | |
| ch_ | Charge ID | Identifier for a Charge object. | |
| cn_ | Credit Note ID | Identifier for a Credit Note object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class BusinessDayPeriodIterator implements \Iterator | |
| { | |
| private $current; | |
| private $period = []; | |
| public function __construct(\DatePeriod $period) { | |
| $this->period = $period; | |
| $this->current = $this->period->getStartDate(); | |
| if(!$period->include_start_date){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| open=$(which xdg-open 2> /dev/null) | |
| if [[ ! $open ]]; then | |
| open='open' | |
| fi | |
| repo=$(git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/") | |
| branch=$(git name-rev --name-only HEAD) | |
| echo "... creating pull request for branch \"$branch\" in \"$repo\"" | |
| $open "https://github.com/$repo/compare/dev...$branch?expand=1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [].forEach.call(document.querySelectorAll('form'), function (input) { | |
| var table = []; | |
| console.group('HTMLForm "' + input.name + '": ' + input.action); | |
| console.log('Element: ', input, '\nName: ' + | |
| input.name + '\nMethod: ' + input.method.toUpperCase() + | |
| '\nAction: ' + input.action || 'null'); | |
| ['input', 'textarea', 'select'].forEach(function (control) { | |
| [].forEach.call(input.querySelectorAll(control), function (node) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |