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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Builder; | |
class CustomBaseModel extends Model { | |
// OVERRIDE: on update, if nothing changed, $saved is now NULL instead of TRUE. |
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 | |
// ADAPT THIS SOLUTION FOR YOUR NEEDS TO YOUR PLUGIN OR MODULE MAIN FILE, INSIDE THE "init()" METHOD | |
namespace something\something; | |
// make sure you have at least this in your "uses" declaration | |
use craft\elements\Entry; | |
use yii\base\Event; | |
use yii\base\ModelEvent; |
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
#!/bin/sh | |
printf "Switching php to version 7.0 with symlinks.\n" | |
printf "Press any key to continue...\n" | |
read CONTINUE | |
printf "Creating backups..." | |
# Backup original binaries |
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
#!/bin/sh | |
# REQUIREMENTS | |
# gdrive - Google Drive CLI Client at https://github.com/prasmussen/gdrive | |
# cronjon creation ability | |
# GENERAL | |
#File prefix | |
PREFIX="backup-" |