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
#!/bin/bash | |
############################################################################### | |
# This is a simple convenience script to switch between PHP 5 and PHP 7 on | |
# UBUNTU both for the CLI and APACHE. | |
# | |
# Just call the script with the first argument set to `apache` or `cli`. The | |
# script will try to dectect if you are currently using PHP 5.6 or PHP 7.1 | |
# and switch to the other version. | |
# |
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 SmartCookie\GraphQL; | |
use GraphQL\Type\Definition\ResolveInfo; | |
use GraphQL\Type\Definition\Type; | |
use SilverStripe\GraphQL\Manager; | |
use SilverStripe\GraphQL\OperationResolver; | |
use SilverStripe\GraphQL\QueryCreator; | |
use SilverStripe\ORM\DataObject; | |
use SilverStripe\GraphQL\Scaffolding\Util\ScaffoldingUtil; |
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
# !/bin/bash | |
# Install CURL | |
sudo apt-get install -y curl | |
## ADD ADDITIONAL PACKAGES SOURCES ## | |
# Support for Multiple PHP version | |
sudo add-apt-repository -y ppa:ondrej/php |
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
<VirtualHost *:443> | |
ServerAdmin webmaster@localhost | |
ServerName www.example.com | |
ServerAlias example.com www.example.org example.org | |
DocumentRoot /var/www/example | |
# Canonical name is important otherwise SERVER_NAME will always equals HTTP_HOST | |
UseCanonicalName On | |
RewriteEngine On | |
RewriteCond "%{SERVER_NAME} %{HTTP_HOST}" "!(^[^ ]*) \1" [NC] |
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
#!/bin/bash | |
# Define a few constant | |
ss_account="[email protected]:silverstripe/" | |
ss_http_account="https://github.com/silverstripe/" | |
os_account="[email protected]:open-sausages/" | |
cc_account="[email protected]:creative-commoners/" | |
# Get our url for our origin remote | |
origin_url=`git remote get-url origin` |
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 { | |
use SilverStripe\CMS\Controllers\ContentController; | |
use SilverStripe\Forms\DateField; | |
use SilverStripe\Forms\FieldList; | |
use SilverStripe\Forms\Form; | |
use SilverStripe\Forms\FormAction; |
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
tags=`git tag -l --sort=v:refname | grep "^[34]\.[0-9]*\.[0-9]*$"` | |
oldhash="unset" | |
for tag in $tags; do | |
git checkout $tag > /dev/null 2>&1 | |
md5=($(md5sum $1)) > /dev/null 2>&1 | |
if [ "$md5" != "$oldhash" ] | |
then | |
echo \"$tag\" \=\> \"$md5\" | |
oldhash=$md5 |
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 | |
use SilverStripe\ORM\DataObject; | |
class Dummy extends DataObject { | |
private static $db = [ | |
'Title' => 'Varchar', | |
]; |
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
SELECT DISTINCT `SiteTree_Versions`.`ClassName`, `SiteTree_Versions`.`LastEdited`, `SiteTree_Versions`.`Created`, `SiteTree_Versions`.`CanViewType`, `SiteTree_Versions`.`CanEditType`, `SiteTree_Versions`.`Version`, `SiteTree_Versions`.`URLSegment`, `SiteTree_Versions`.`Title`, `SiteTree_Versions`.`MenuTitle`, `SiteTree_Versions`.`Content`, `SiteTree_Versions`.`MetaDescription`, `SiteTree_Versions`.`ExtraMeta`, `SiteTree_Versions`.`ShowInMenus`, `SiteTree_Versions`.`ShowInSearch`, `SiteTree_Versions`.`Sort`, `SiteTree_Versions`.`HasBrokenFile`, `SiteTree_Versions`.`HasBrokenLink`, `SiteTree_Versions`.`ReportClass`, `SiteTree_Versions`.`RelationFieldsTestPageID`, `SiteTree_Versions`.`SubsiteID`, `SiteTree_Versions`.`ParentID`, `SiteTree_Versions`.`RecordID` AS `ID`, | |
CASE WHEN `SiteTree_Versions`.`ClassName` IS NOT NULL THEN `SiteTree_Versions`.`ClassName` | |
ELSE 'SilverStripe\\CMS\\Model\\SiteTree' END AS `RecordClassName`, `SiteTree_Versions`.`RecordID`, `SiteTree_Versions`.`WasPublished`, `SiteTree_Versio |
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 | |
use GuzzleHttp\Psr7\StreamWrapper; | |
use Intervention\Image\AbstractFont; | |
use Intervention\Image\AbstractShape; | |
use Intervention\Image\ImageManager; | |
use SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy; | |
use SilverStripe\Assets\FilenameParsing\LegacyFileIDHelper; | |
use SilverStripe\Assets\Flysystem\FlysystemAssetStore; | |
use SilverStripe\Assets\Image; |
OlderNewer