Skip to content

Instantly share code, notes, and snippets.

View lincolnpixel's full-sized avatar

Lincoln Gbenga Olagbaju lincolnpixel

View GitHub Profile
@lincolnpixel
lincolnpixel / 0-Debugging-ExpressionEngine.md
Created November 1, 2021 18:37 — forked from litzinger/0-Debugging-ExpressionEngine.md
How to show errors when you get a white screen in EE. Turning up the debugging will reveal PHP errors.

Overview

Below are two techniques to help debug the WSOD (white screen of death), usually a 500 server error, in an ExpressionEngine site. The Basic-Debugging option will be suitable in most cases and is specific to ExpressionEngine. The Advanced-Debugging is generic and applicable to any PHP based software. If the basic debugging does not work, try the advanced.

If you get a WSOD you will need to first get your site to reveal an error before reporting it to EllisLab or the add-on developer. Simply reporting "I get a white screen" does not give the developer enough information to assist you. An error message on the other hand will point the developer to the source of the issue.

@lincolnpixel
lincolnpixel / gist:a6d3bd10024b4f352638c5fd40e176b4
Created December 18, 2020 15:56 — forked from sreez/gist:c624b3e440b66f9d16a9dc39a2297ed1
taiwindcss default list of padding , font size and line height against equivalent pixels for font base 16px
0px 0rem .p-0
4px 0.25rem .p-1
8px 0.5rem .p-2
12px 0.75rem .p-3, .leading-3, .text-xs
14px 0.875rem .text-sm
16px 1rem .p-4, .leading-4, .text-base
18px 1.125rem .text-lg
20px 1.25rem .p-5, .leading-5, .text-xl
24px 1.5rem .p-6, .leading-6, .text-2xl
28px 1.75rem .leading-7
@lincolnpixel
lincolnpixel / 1) readme.md
Created March 28, 2020 07:46 — forked from aaronwaldon/1) readme.md
How to set up Gulp for Compass compilation and minification, JavaScript minification, livereloading, and use with ExpressionEngine.

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

*(for EE 2 and future EE4) Is it possible to assign a global variable (template variable) for use in templates
on the file system (like in the config file)? We have a unique set up of dev/testing/live servers and
would like to use a global variable for specifying the URL in templates, without relying on storing that
variable value in the database.
*Add it right inside my config.php file
<?php
// Declare an array for globals at top of config file
$global = [];
@lincolnpixel
lincolnpixel / ee_multilanguage_with_resource_router.md
Created October 5, 2016 17:01 — forked from croxton/ee_multilanguage_with_resource_router.md
Using Resource Router for roll-your-own multi-language ExpressionEngine sites

###Multi-language routing with Resource Router

The idea is to set up ISO 639-1 language code prefixes for urls (e.g. en/, de/, fr/), and set global variables {global:lang} and {global:lang_dir} for use in your templates.

In the control panel create a category group "languages" and populate it with your languages, setting the category url title to the appropriate 2-letter language code. Assign the category group to the channels you want to translate.

For example:

Category Name Category URL Title

ExpressionEngine .htaccess/Apache conf

Please use these at your own risk. I cannot be responsible for having no idea what I am doing and breaking your server.

This is a collection of Apache configuration settings that I use in my ExpressionEngine projects. Since I have always been a big fan of the HTML5 Boilerplate I took inspiration from their .htaccess file and tweaked my configuration with other settings I have used over the years.

This gist contains:

  • _EXTENDED.htaccess This is a general .htaccess file I rename and edit as needed for each site. Note: When I host a site on my prad/stage/dev servers I move most or all of these rules into the vhost.conf file
  • _SAMPLE.httpd.conf I use Ubuntu on my development, staging, and production servers so this is specific to Apache 2 on my setup. Essentially this file extends the apache2.conf (in my setup).
# Globals
.DS_Store
cgi-bin/
error_log
# Master Config
config/config.local.php
# Caches
sized/
This method requires the CE Image addon.
Tell your editors to change the width/height/alignment in the image properties pop up to 300px or whatever and set the alignment if they want, but the actual size displayed on the page will be decided by you in the template code and CSS.
In the EE template:
{exp:ce_img:bulk max="500" crop="no" allow_scale_larger="no" quality="80" output='<a href="{orig}" class="embeded_image" title="{attr:title}" alt="{attr:alt}" style="{attr:style}"><img src="{made}" /></a>'}
{wygwam_field}
{/exp:ce_img:bulk}
In the CSS:
{!--example url: template_group/template/123--}
{exp:safecracker entry_id="{segment_3}" return="template_group/template/ENTRY_ID"}
...
{!--
this is the trick that duplicates the entry
even though entry_id 123 is LOADED into this form
this blank entry_id field will trick SC into thinking
this is a new entry

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik