This is a quick (rough) guide on how to protect a Serverpilot pilot app with auth basic
ssh SERVERPILOTUSERNAME@your.server.ip.address| <?php | |
| /** | |
| * Product & Entry Search plugin for Craft CMS 3.x | |
| * | |
| * Use site search across both products and entries allowing for pagination. | |
| * | |
| * @link https://adigital.agency | |
| * @copyright Copyright (c) 2018 A Digital | |
| */ |
| # ---------------------------------------------------------------------- | |
| # | Cleaning URLs | | |
| # ---------------------------------------------------------------------- | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # Remove www from URL's | |
| RewriteCond %{HTTP_HOST} ^www\.(.+) | |
| # RewriteCond %{HTTPS}s/%1 ^(on(s)|offs)/(.+) | |
| RewriteRule ^ http%2://%3%{REQUEST_URI} [L,R=301] |
| {# ================================================================== #} | |
| {# Responsive Image Macro | |
| {# ================================================================== #} | |
| {# | |
| Macro to centralize the markup and config for responsive images. | |
| Based on an article by Marion Newlevant (@marionnewlevant) and | |
| adapted for the Lazysizes plugin. Read more: | |
| https://straightupcraft.com/articles/responsive-images-with-twig-macros |
| This is now part of craft-scripts: | |
| https://github.com/nystudio107/craft-scripts |
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
This gist contains multiple files. Each file contains a specific type of Apex or Visualforce comment header.
When code is no longer used, but can not be deleted from your org, add the @deprecated annotation to the File or Method Header.
Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
| $my-icons-spacing: 10px; // give some space to avoid little pixel size issues on resize | |
| @import "my-icons/*.png"; | |
| $my-icons-sprite-dimensions: true; | |
| @include all-my-icons-sprites; | |
| // the fun part |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |