apt-get install pkg-config libmagickwand-dev -y
cd ~/downloads
wget http://pecl.php.net/get/imagick-3.4.0RC2.tgz
tar xvzf imagick-3.4.0RC2.tgz
cd imagick-3.4.0RC2
/opt/sp/php7.0/bin/phpize
./configure
make install
rm -rf /tmp/imagick-3.4.0RC2*
This file contains hidden or 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
"list": { | |
"properties": { | |
"styles": false | |
} | |
} |
This file contains hidden or 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
"link": { | |
"decorators": { | |
"openInNewTab": { | |
"attributes": { | |
"rel": "noopener noreferrer", | |
"target": "_blank" | |
}, | |
"label": "Open in a new tab", | |
"mode": "manual" | |
} |
This file contains hidden or 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
use ether\simplemap\elements\Map as SimpleMapElement; | |
Event::on( | |
Elements::class, | |
Elements::EVENT_AFTER_SAVE_ELEMENT, | |
function (ElementEvent $event) { | |
if (!Craft::$app->getIsMultiSite()) { | |
return; | |
} |
This file contains hidden or 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/main.php and [web|console].php, when | |
* Craft's bootstrap script is defining the configuration for the entire | |
* application. |
This file contains hidden or 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 | |
class CraftMultiLocaleValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
This file contains hidden or 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
{% includeJsFile('https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js') %} | |
{% set script %} | |
Vue.config.debug = true; | |
Vue.config.delimiters = ['${', '}']; | |
new Vue({ | |
el: '#content', | |
data: { | |
message: 'Hello Vue.js!' |
This file contains hidden or 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
var manageEnvironment = function(environment) { | |
environment.addFilter('custom', function(str) { | |
return 'Olav, du må vakne. Indianarane kjem.'; | |
}); | |
} | |
var htmlTask = function() { | |
return gulp.src(paths.src) | |
.pipe(data(getData)) |
This file contains hidden or 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
public function getFieldValues(BaseElementModel $entry, $fields = null) | |
{ | |
foreach ($entry->fieldLayout->fields as $fieldLayoutField) { | |
$fieldHandle = $fieldLayoutField->field->handle; | |
if ($fields === null || in_array($fieldHandle, $fields)) { | |
$field[$fieldHandle] = $entry->getFieldValue($fieldHandle); | |
} | |
} | |
return $field; |
This file contains hidden or 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
$(function () { | |
// Bind a greedy event handler | |
$('body').on('elementselectchange', '.elementselect', onElementSelectChange); | |
// Poll to evalute elementselects every 10ms | |
setInterval(evaluateElementSelects, 10); | |
function evaluateElementSelects () | |
{ |
NewerOlder