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
#!/bin/sh | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
if [ "$CURRENT_BRANCH" != "master" ];then | |
echo $CURRENT_BRANCH | |
echo "Please switch to the master branch to start a new feature." | |
exit | |
fi | |
echo "What is the name of this feature (e.g. my-feature-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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
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
#!/bin/sh | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > ~/git-prompt.sh | |
curl https://gist.githubusercontent.com/unclecheese/acdf2139a348d0c73910/raw/4192c8f5e81d088d8559920878cfa448fd1e7644/.bash_profile >> ~/git-prompt.sh | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/git-completion.bash | |
chmod +x ~/git-prompt.sh |
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
class Page extends SiteTree { | |
public function IsLostPassword() { | |
return in_array(Controller::curr()->getRequest()->param('Action'), array("lostpassword","passwordsent","changepassword")); | |
} | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
class GraphQLScaffolder | |
{ | |
const READ | |
const UPDATE | |
const DELETE | |
const CREATE | |
/** |
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 | |
class YourPage extends Page | |
{ | |
private static $has_one = [ | |
'Slideshow1' => 'Image', | |
'Slideshow2' => 'Image', | |
// etc.. | |
]; | |
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 | |
class Page_Controller extends ContentController | |
{ | |
public function init() | |
{ | |
parent::init(); | |
Requirements::javascript('framework/thirdparty/jquery/jquery.js'); | |
Requirements::javascript('themes/simple/javascript/script.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 | |
class GridFieldRegistry | |
{ | |
public function add($identifier, GridField $gridField) | |
{ | |
if ($identifierIsNotUnique) { throw... } | |
$this->registry[] = new GridFieldRegistration( | |
$identifier, |
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 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; |
OlderNewer