Skip to content

Instantly share code, notes, and snippets.

View brandonpayton's full-sized avatar

Brandon Payton brandonpayton

View GitHub Profile
@brandonpayton
brandonpayton / autocomplete-abbreviations.js
Last active June 28, 2018 16:09
Run in dev tools console to add an abbreviation autocompleter for Gutenberg.
( function () {
function abbreviationCompleter( completers ) {
return {
name: 'abbreviation',
triggerPrefix: '::',
options: [
{ letters: 'FYI', expansion: 'For Your Information' },
{ letters: 'AFAIK', expansion: 'As Far As I Know' },
{ letters: 'IIRC', expansion: 'If I Recall Correctly' },
],
@brandonpayton
brandonpayton / _StoreWidgetMixin.js
Last active August 29, 2015 13:57
Mixin for Store-based Widgets
define([
'dojo/_base/declare', 'dojo/dom-construct'
], function(declare, domConstruct) {
return declare(null, {
// summary:
// A mixin for creating a store-based widget
store: null,
query: null,
@brandonpayton
brandonpayton / gist:8919361
Created February 10, 2014 16:38
bir-example
define([
'intern!object',
'require',
'bir/RemoteRequire',
'bir/dijit',
'bir/value'
], function (registerSuite, require, RemoteRequire, dijit, value) {
registerSuite({
name: 'example',
@brandonpayton
brandonpayton / .eslintrc
Last active May 30, 2018 10:40
annotated eslint config for Dojo 2 code conventions
{
"env": {
"browser": true,
"node": false,
"amd": false
},
"rules": {
"no-array-constructor": 2,
"no-dupe-keys": 2,