git patch

Useful commands:

git format-patch master --stdout > fix_empty_poster.patch
git apply --stat fix_empty_poster.patch
git apply --check fix_empty_poster.patch
git am --signoff < fix_empty_poster.patch
git apply --reject --whitespace=fix fix_empty_poster.patch
Advertisements
Standard

CKEditor target=_blank by default

  this.editor.on('instanceReady', function(){
      // Note nested arrays
      // http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
      // This rule will add the target="_blank" attribute to all links that
      // do not have it.
      this.editor.filter.addTransformations([
        [{
          element: 'a',
          left: function( el ) {
            return el.target !== '_blank';
          },
          right: function( el, tools ) {
            el.attributes.target = '_blank';
          }
        }]
      ]);
    }.bind(this));
Standard