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
# Set the bucket name and date limit that you want to scan for... | |
# | |
# For example, if you deleted everything at 9'ish, set the DATE_LIMIT for a | |
# few minutes before to ensure you find only the stuff you deleted by error | |
# | |
BUCKET_NAME="..." | |
DATE_LIMIT="0000-00-00T00:00:00.000Z" | |
aws s3api list-object-versions --bucket "${BUCKET_NAME}" > objects.json | |
cat objects.json | jq --arg DATE_LIMIT "${DATE_LIMIT}" '[ .DeleteMarkers[] | select(.LastModified > $DATE_LIMIT and .IsLatest) | { file: .Key, version: .VersionId } ]' > markers-to-delete.json |
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
# Set the bucket name and date limit that you want to scan for... | |
# | |
# For example, if you deleted everything at 9'ish, set the DATE_LIMIT for a | |
# few minutes before to ensure you find only the stuff you deleted by error | |
# | |
BUCKET_NAME="..." | |
DATE_LIMIT="0000-00-00T00:00:00.000Z" | |
aws s3api list-object-versions --bucket "${BUCKET_NAME}" > objects.json | |
cat objects.json | jq --arg DATE_LIMIT "${DATE_LIMIT}" '[ .DeleteMarkers[] | select(.LastModified > $DATE_LIMIT and .IsLatest) | { file: .Key, version: .VersionId } ]' > markers-to-delete.json |
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 | |
namespace Application\Block\ExpressEntryList; | |
use Concrete\Core\Express\Entry\Search\Result\Result; | |
use Concrete\Core\Express\EntryList; | |
class Controller extends \Concrete\Block\ExpressEntryList\Controller | |
{ | |
public function view() |
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 | |
namespace Application\Job; | |
use Concrete\Core\File\Importer; | |
use Concrete\Core\Job\QueueableJob; | |
use ZendQueue\Message as ZendQueueMessage; | |
use ZendQueue\Queue as ZendQueue; | |
class ImportFiles extends QueueableJob | |
{ |
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 ScanDuplicateFileName extends QueueableJob | |
{ | |
public $jNotUninstallable=0; | |
public $jSupportsQueue = true; | |
public function getJobName() | |
{ | |
return t('Scan Duplicate File Name'); |
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 | |
// application/bootstrap/app.php | |
/** @var \Concrete\Core\Validator\ValidatorManagerInterface $passwordValidator */ | |
$passwordValidator = Core::make('validator/password'); | |
/** @var \Concrete\Core\Validator\String\RegexValidator $regexValidator */ | |
$regexValidator = Core::make( | |
\Concrete\Core\Validator\String\RegexValidator::class, | |
['/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'] | |
); |
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 | |
//ページタイプの「出力」で'Main'エリアにコンポーザーで扱うcontentブロックを入れてる場合 | |
$pageType = \PageType::getByHandle('ページタイプハンドル'); | |
$template = $pageType->getPageTypeDefaultPageTemplateObject(); | |
$d = $pageType->createDraft($template); | |
$d->setPageDraftTargetParentPageID(親ページID); | |
$pageType->savePageTypeComposerForm($d); | |
$pageType->publish($d); | |
//$dには追加したページオブジェクトが入ってくる |
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 | |
/* | |
1.- Create an App. | |
2.- Go to: https://developers.facebook.com/tools/explorer/ | |
+ Select your new created app on the right top. | |
+ Select "Get App Token" |
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 | |
/** | |
* Always trust incoming request. | |
* | |
* application/config/concrete.php | |
* | |
* For more detail, see: http://symfony.com/doc/current/cookbook/request/load_balancer_reverse_proxy.html | |
*/ |
NewerOlder