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 | |
# how to install? | |
# 1. create ~/local/bin/git-meld-all and copy contents below | |
# 2. edit ~/.bashrc to include this line ... export PATH=$PATH:~/local/bin/ | |
# 3. make sure the git-meld-all file can be executed | |
# deleting foo.bar.orig files ... | |
find . -name "*.orig" -exec rm "{}" -i \; |
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 Page extends SiteTree { | |
private static $has_many = array( | |
'Emails' => 'Page_Email' | |
); | |
/** | |
* CMS Fields |
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 ExampleBuildTask extends BuildTask | |
{ | |
protected $title = 'Add more data to our example'; | |
protected $description = 'Takes the Example Objects and populates the example fields'; | |
protected $enabled = true; |
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 | |
/** | |
* PSEUDO CODE! | |
* | |
*/ | |
$returnArray = array(); | |
foreach($allClasses as $class) { |
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
/** | |
* | |
* @param String RootSelector - e.g. MyForm as in <form id="MyForm"> or <div id="MyDiv"> | |
* | |
*/ | |
var MyJSFx = function(RootSelector) { |
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 | |
/** | |
* replaces `Requirements_Backend` | |
* this class blocks all JS and CSS files and intead copies them to a folder | |
* for webpack inclusion. | |
* | |
* `Custom` (inline) CSS / JS still works as normal. | |
* | |
*/ |
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 MyPage extends Page { | |
/** | |
* can the page be created at the root | |
* of the site tree (i.e. without parent)? | |
* @var boolean | |
*/ | |
private static $can_be_root = true; |
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 MyPage extends Page { | |
private static $many_many = array( | |
"CoolPages" => "SiteTree" | |
); | |
function getCMSFields(){ | |
$fields->addFieldToTab( |
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 MyObject extends DataObject { | |
/** | |
* finds or creates a MyObject based the value for MyObject.SomethingElse | |
* | |
* @param string $code | |
* @return MyObject | |
*/ |
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 ReplacementData { | |
//... | |
private function getData($to) { | |
//... | |
$array = array(); |