Skip to content

Instantly share code, notes, and snippets.

Avatar

Anselm Christophersen anselmdk

View GitHub Profile
@anselmdk
anselmdk / .profile.md
Last active Mar 1, 2017
Stuff that should go in the .profile file
View .profile.md

Git auto completion

_From this SO answer

  1. Download the file to your home directory:
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  1. Add to your .profile file:
@anselmdk
anselmdk / npm.md
Last active Oct 5, 2016
NPM Cheat Sheet
View npm.md

NPM Cheat Sheet

install

npm install --save PACKAGE
npm install --save-dev PACKAGE
@anselmdk
anselmdk / FeatureContext.php
Last active May 24, 2016
Behat tests for SilverStripe modules
View FeatureContext.php
<?php
namespace SilverStripe\Mysite\Test\Behaviour;
use SilverStripe\Cms\Test\Behaviour;
// PHPUnit
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';
/**
* Features context
@anselmdk
anselmdk / fields.md
Last active Mar 3, 2016
SilverStripe Topics
View fields.md
@anselmdk
anselmdk / README.md
Last active Mar 29, 2016
React Cheat Sheet
View README.md

React Cheat Sheet

@anselmdk
anselmdk / misc.md
Created Feb 23, 2016
PHP Cheat Sheet
View misc.md

PHP Cheat Sheet

Save to file

file_put_contents('myfile','content');
@anselmdk
anselmdk / es6-classes.md
Last active Dec 20, 2016
JavaScript Cheat Sheet
View es6-classes.md

ES6 Classes

Parent:

class Parent {
  constructor(vars) {
    //doing some grown up stuff
  }
}
@anselmdk
anselmdk / branches.md
Last active Nov 14, 2016
Git Cheat Sheet
View branches.md

Branches

Deletion

git branch -d local-branch
View emailing.md
@anselmdk
anselmdk / DataObjectSnippet.md
Last active Jul 7, 2018
SilverStripe Cheat Sheet
View DataObjectSnippet.md

DataObject Snippet

You can’t perform that action at this time.