This file contains 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
$languages = [ | |
'ab' => 'Abkhazian', | |
'aa' => 'Afar', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'sq' => 'Albanian', | |
'am' => 'Amharic', | |
'ar' => 'Arabic', | |
'an' => 'Aragonese', | |
'hy' => 'Armenian', |
This file contains 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
actor: Tester | |
paths: | |
tests: tests | |
log: tests/_output | |
data: tests/_data | |
support: tests/_support | |
envs: tests/_envs | |
settings: | |
bootstrap: _bootstrap.php | |
params: |
This file contains 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 | |
use craft\test\TestSetup; | |
return TestSetup::createTestCraftObjectConfig(); |
This file contains 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 | |
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'); |
This file contains 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
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" |
This file contains 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
// borrowed mightily from Fillament Group - https://www.filamentgroup.com/lab/modernizing-delivery.html | |
/*jshint esversion: 6 */ | |
/*jshint strict:false */ | |
/*global self:true */ | |
/*global caches:true */ | |
/*global Response:true */ | |
/*global Request:true */ | |
(function(){ |
This file contains 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 | |
/** | |
* Yii Application Config | |
* | |
* Edit this file at your own risk! | |
* | |
* The array returned by this file will get merged with | |
* vendor/craftcms/cms/src/config/app.php and app.[web|console].php, when | |
* Craft's bootstrap script is defining the configuration for the entire | |
* application. |
This file contains 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
{# Using the example code from the docs #} | |
{% set searchQuery = craft.app.request.getParam('q') %} | |
{% set entries = craft.entries() | |
.search(searchQuery) | |
.orderBy('score') | |
.all() %} | |
{# You can do something like this where you just output the Section name #} | |
{% for entry in entries %} | |
<h4>{{ entry.section }}</h4> |
This file contains 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
# The environment Craft is currently running in ('dev', 'staging', 'production', etc.) | |
ENVIRONMENT="dev" | |
# The secure key Craft will use for hashing and encrypting data | |
SECURITY_KEY="" | |
# The database driver that will used ('mysql' or 'pgsql') | |
DB_DRIVER="mysql" | |
# The database server name or IP address (usually this is 'localhost' or '127.0.0.1') |
This file contains 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
[alias] | |
zip = archive --format=zip -o latest.zip HEAD | |
yesterday = log --before={`date \"+%Y-%m-01\"`} --after={`date -v-1m \"+%Y-%m-01\"`} | |
st = status | |
b = branch | |
p = pull | |
lg = log | |
type = cat-file | |
r = remote | |
unstage = reset |
NewerOlder