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
display dialog "When do you want to sleep your computer? (in minutes)" default answer "60" | |
delay (text returned of the result) * 60 | |
tell application "Google Chrome" | |
quit | |
end tell | |
tell application "Finder" | |
sleep |
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
sudo chgrp -R www-data storage public/cpresources public/uploads | |
sudo chmod -R ug+rwx storage public/cpresources public/uploads |
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; | |
use craft\base\Element; | |
use craft\elements\User; | |
use craft\events\ModelEvent; | |
use yii\base\Event; | |
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 | |
// CraftCMS3 is using Yii2 framework which doesn't have a decoupled validator class. | |
// If you create a dummy model filled with the attributes coming from a POST request | |
// you can use custom validations for the incoming attributes. | |
$testPostData = [ | |
'name' => 'Tamas Erdelyi', | |
'email' => '[email protected]' | |
]; |