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
(function($) { | |
//base function to call and setup everything | |
$.fn.modal=function(options){ | |
return this.each(function(){ | |
if(this._modal) return; //if already a modal return | |
if(typeof(options) != "undefined") var params = $.extend({}, $.fn.modal.defaults, options); //if some options are passed in merge them | |
else var params = $.fn.modal.defaults; | |
if(typeof(modal_count) == "undefined") modal_count=0; //set the counter to 0 | |
modal_count++; | |
this._modal=modal_count; //set what modal number this is |
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 | |
trait Configuration{ | |
protected static $_defaults; | |
protected $_settings; | |
public function settings($key){ | |
if(isset($this->_settings[$key]) && is_callable($this->_settings[$key])) return call_user_func($this->_settings[$key]); | |
if(isset($this->_settings[$key])) return $this->_settings[$key]; | |
if(isset(self::$_defaults[$key]) && is_callable(self::$_defaults[$key])) return call_user_func(self::$_defaults[$key]); |
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
{% extends 'base.twig' %} | |
{% block title %}Custom Page Title{% endblock %} | |
{% block css %} | |
{{ parent() }} | |
<link rel="stylesheet" type="text/css" href="/my/custom/file.css"> | |
{% endblock %} | |
{% block content %} | |
all content goes in here | |
{% endblock %} | |
{% block js %} |
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 Aws\S3\S3Client; | |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\AwsS3 as Adapter; | |
$client = S3Client::factory(array( | |
'key' => '[your key]', | |
'secret' => '[your secret]', | |
'region' => '[aws-region]' | |
)); |
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 Mocks; | |
use Doctrine\DBAL\Driver\Statement; | |
/** | |
* Doctrine DBAL Statement implementing \Iterator. | |
* | |
* This class has been created because of a bug in PHPUnit Mock Objects. |
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
pages: | |
name: Pages | |
singular_name: Page | |
fields: | |
title: | |
type: text | |
slug: | |
type: slug | |
uses: title | |
image: |
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
composer install --optimize-autoloader --prefer-dist --no-scripts | |
./vendor/bin/phpunit | |
composer install --optimize-autoloader --prefer-dist --no-scripts --no-dev | |
docker build -t <appname>_img:$CI_BUILD_REF_NAME . | |
docker tag <appname>_img:$CI_BUILD_REF_NAME quay.io/<username>/<appname>:$CI_BUILD_REF_NAME | |
docker push quay.io/<username>/<appname>:$CI_BUILD_REF_NAME |
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 Bolt\Thumbs\ThumbnailResponder; | |
class RetinaThumbnailResponder extends ThumbnailResponder | |
{ | |
public function parseRequest() | |
{ | |
parent::parseRequest(); |
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
pages: | |
name: Pages | |
singular_name: Page | |
field_defaults: &defaults | |
title: | |
type: text | |
class: large | |
slug: | |
type: slug | |
uses: title |
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 | |
require_once "../private/vendor/autoload.php"; | |
$configuration = new Bolt\Configuration\Composer(dirname(__DIR__)."/private"); | |
$configuration->setPath("web","../public"); | |
$configuration->setPath("files","../public/files"); | |
$configuration->setPath("themebase","../public/theme"); | |
$configuration->getVerifier()->removeCheck('apache'); | |
$configuration->verify(); | |
$app = new Bolt\Application(array('resources'=>$configuration)); | |
$app->initialize(); |
OlderNewer