Skip to content

Instantly share code, notes, and snippets.

View ryanirelan's full-sized avatar

Ryan Irelan ryanirelan

View GitHub Profile
@ryanirelan
ryanirelan / introduction-to-extending-craft-cms.json
Created February 9, 2026 01:07
Quiz: Introduction to Extending Craft CMS
{
"quizzes": [
{
"title": "Introduction to Extending Craft CMS",
"passingScore": 70,
"timeLimit": 0,
"maxAttempts": 0,
"allowRetakes": 1,
"showCorrectAnswers": 1,
"shuffleQuestions": 1,
@ryanirelan
ryanirelan / debugging-with-xdebug.json
Created February 8, 2026 23:56
Quiz: Debugging with Xdebug
{
"quizzes": [
{
"title": "Debugging with Xdebug",
"passingScore": 70,
"timeLimit": 0,
"maxAttempts": 0,
"allowRetakes": 1,
"showCorrectAnswers": 1,
"shuffleQuestions": 1,
@ryanirelan
ryanirelan / real-world-craft-cms.json
Created February 8, 2026 22:36
Quiz: Real World Craft CMS
{
"quizzes": [
{
"title": "Real World Craft CMS",
"passingScore": 70,
"timeLimit": 0,
"maxAttempts": 0,
"allowRetakes": 1,
"showCorrectAnswers": 1,
"shuffleQuestions": 1,
@ryanirelan
ryanirelan / ai-assisted-craft-cms-development.json
Created February 8, 2026 17:20
Quiz: AI-Assisted Craft CMS Development
{
"quizzes": [
{
"title": "AI-Assisted Craft CMS Development",
"passingScore": 70,
"timeLimit": 0,
"maxAttempts": 0,
"allowRetakes": 1,
"showCorrectAnswers": 1,
"shuffleQuestions": 1,
@ryanirelan
ryanirelan / ai-assisted-craft-cms-development.json
Created February 8, 2026 15:39
Quiz: AI-Assisted Craft CMS Development
{
"quizzes": [
{
"title": "AI-Assisted Craft CMS Development",
"passingScore": 70,
"timeLimit": 0,
"maxAttempts": 0,
"allowRetakes": 1,
"showCorrectAnswers": 1,
"shuffleQuestions": 0,
$languages = [
'ab' => 'Abkhazian',
'aa' => 'Afar',
'af' => 'Afrikaans',
'ak' => 'Akan',
'sq' => 'Albanian',
'am' => 'Amharic',
'ar' => 'Arabic',
'an' => 'Aragonese',
'hy' => 'Armenian',
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
params:
<?php
use craft\test\TestSetup;
return TestSetup::createTestCraftObjectConfig();
<?php
use craft\test\TestSetup;
ini_set('date.timezone', 'UTC');
// Use the current installation of Craft
define('CRAFT_STORAGE_PATH', __DIR__ . '/_craft/storage');
define('CRAFT_TEMPLATES_PATH', __DIR__ . '/_craft/templates');
define('CRAFT_CONFIG_PATH', __DIR__ . '/_craft/config');
@ryanirelan
ryanirelan / registration.js
Created February 7, 2019 15:36
Service worker registration code. For livestream at: https://craftquest.io/livestreams/what-are-service-workers
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js', {
scope: "/"
}).then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
// Trim the caches on load
navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage({
command: "trimCaches"