Skip to content

Instantly share code, notes, and snippets.


Aaron Carlino unclecheese

  • Uncle Cheese Productions
  • Wellington, New Zealand
View GitHub Profile
View FluentQueryPlugin.php
namespace MyProject;
use SilverStripe\GraphQL\Schema\Field\Query;
use SilverStripe\GraphQL\Schema\Interfaces\QueryPlugin;
use SilverStripe\GraphQL\Schema\Interfaces\SchemaUpdater;
use SilverStripe\GraphQL\Schema\Schema;
unclecheese / cow-compare.php
Created Sep 23, 2019
Generates Github compare links between two given tags of a silverstripe module
View cow-compare.php
#!/usr/bin/env php
$path = isset($argv[1]) ? $argv[1] : './';
$isMinor = isset($argv[2]) && $argv[2] === '-m';
$path = rtrim($path, '/') . '/';
$lockFile = $path . 'composer.lock';
if (!file_exists($lockFile)) {
View NavigatorInjection.php
namespace SilverStripe\Bambusa\Extensions;
use JonoM\BetterNavigator\Extension\BetterNavigatorExtension;
use SilverStripe\ORM\Extension;
use SilverStripe\ORM\FieldType\DBHTMLText;
View UnionList.php
namespace SilverStripe\Snapshots;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\ORM\Connect\Query;
use SilverStripe\ORM\Limitable;
use SilverStripe\ORM\Queries\SQLSelect;
View Read.php
namespace SilverStripe\GraphQL\Scaffolding\Scaffolders\CRUD;
use Exception;
use GraphQL\Type\Definition\InputObjectType;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Core\ClassInfo;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\OperationResolver;
View 00_GridFieldRegistry.php
class GridFieldRegistry
public function add($identifier, GridField $gridField)
if ($identifierIsNotUnique) { throw... }
$this->registry[] = new GridFieldRegistration(
View Page_Controller.php
class Page_Controller extends ContentController
public function init()
View YourPage.php
class YourPage extends Page
private static $has_one = [
'Slideshow1' => 'Image',
'Slideshow2' => 'Image',
// etc..
View 1_GraphQLScaffolder.php
class GraphQLScaffolder
const READ
const UPDATE
const DELETE
const CREATE
unclecheese / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console