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
server { | |
# (略) | |
location ~* /wp-login\.php|/wp-admin/((?!admin-ajax\.php).)*$ { | |
index index.php index.html index.htm; | |
# 許可するIPアドレスを記述 | |
allow 192.168.0.1; | |
deny all; | |
# Basic認証のメッセージ |
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 defined('C5_EXECUTE') or die("Access Denied."); | |
//Load Data models in package | |
Loader::model("data_list","data"); | |
Loader::model("data_type","data"); | |
//Create DataType object | |
$dataType = new DataType; | |
//load DataType by handle | |
$dataType->Load('dtHandle=?', array("object")); |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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 | |
*/ |
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 | |
//ページタイプの「出力」で'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 | |
// 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 | |
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 | |
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 | |
{ |
OlderNewer