Skip to content

Instantly share code, notes, and snippets.

View siebird's full-sized avatar

Austin Siewert siebird

View GitHub Profile
@aaronbushnell
aaronbushnell / README.md
Last active February 1, 2024 20:48
🗓 Setting up omnilight/yii2-scheduling for flexible Craft task scheduling

📦 Installation

  1. Run composer require omnilight/yii2-scheduling to install the scheduling package
  2. Setup a config/schedule.php file to house your scheduled processes
  3. Modify your config/app.php to include the schedule component details to run the Craft command (instead of yii)
  4. Run php craft schedule/run --scheduleFile=@config/schedule.php to process any scheduled operations.

💡 Tip: You likely want to run php craft schedule/run --scheduleFile=@config/schedule.php on a cron job that fires every minute!

🙏 Credits

@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active April 19, 2024 11:33
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
$ = jQuery;
/*
* jQuery BBQ: Back Button & Query Library - v1.3pre - 8/26/2010
* http://benalman.com/projects/jquery-bbq-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
@croxton
croxton / ee_multilanguage_with_resource_router.md
Last active April 5, 2022 19:11
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
@kevinsmith
kevinsmith / sandsync.sh
Created November 18, 2014 22:51
Script to sync staging (sandbox) DB and file uploads with local environment
#!/bin/sh
#
# sandsync.sh
#
# This is a shell script for keeping sandbox and local EE
# environments in sync. It takes a backup of a project's sandbox database,
# clears the local database and imports the remote's backup into local,
# and performs a one-way sync of the uploads directory from remote to local.
# Drop it in the directory above your version-controlled projected directory.
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@litzinger
litzinger / 0-Debugging-ExpressionEngine.md
Last active January 26, 2023 20:28
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.

@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

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

@manifestuk
manifestuk / gist:2557044
Created April 30, 2012 10:22
ExpressionEngine Config Settings for GMail SMTP (Hopefully)
$env_conf['mail_protocol'] = 'smtp';
$env_conf['smtp_server'] = 'tls://smtp.gmail.com:XXX'; // Use :XXX to set the port number.
$env_conf['smtp_username'] = 'xxx@xxx.xxx';
$env_conf['smtp_password'] = 'xxx';
$env_conf['email_newline'] = "\r\n";
$env_conf['email_crlf'] = "\r\n";
@siffring
siffring / .htaccess
Created March 4, 2012 17:33
htaccess to password protect a specific server
# ----------------------------------------------------------------------
# Password protect staging server
# Use one .htaccess file across multiple environments
# (e.g. local, dev, staging, production)
# but only password protect a specific environment.
# ----------------------------------------------------------------------
SetEnvIf Host staging.domain.com passreq
AuthType Basic
AuthName "Password Required"