Instantly share code, notes, and snippets.

View columns-tinymce.js
/* global tinymce */
(function() {
const columnsTinyMCEButton = (function(){
return function(tinyMCE) {
tinyMCE.PluginManager.add( 'columns', function( editor, url ) {
// Add Button to Visual Editor Toolbar
editor.addButton('columns', {
title: 'Insert Column',
cmd: 'columns',
View validate-acf-wysiwyg.php
<?php
/**
* Validate WYSIWYG field so that it outputs only 250 characters
*
* Targets the overview field in the documentation only.
*
* @param bool $valid Check the validity of the field.
* @param string $value The field value.
* @param array $field Array with the field details.
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": "$>:\\",
View social-share.js
jQuery(document).ready(function ($) {
'use strict';
$.fn.socShare = function(opts) {
var $this = this;
var $win = $(window);
opts = $.extend({
attr : 'href',
facebook : false,
View Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"A File Icon",
"Alignment",
"Babel",
View gitconfig
credential.helper=osxkeychain
user.email= //
user.name= //
user.signingkey= //
help.autocorrect=0
diff.tool=default-difftool
difftool.default-difftool.cmd='sublime' --wait
core.editor=sublime --wait
core.excludesfile=fullpathto/.gitignore_global //
core.ignorecase=false
View git-colapse.js
$$('div.file-header > div.file-actions > button').map(function(x){x.click()});
View iTerm-profile.json
{
"Ansi 6 Color" : {
"Green Component" : 0.57082360982894897,
"Red Component" : 0.14679534733295441,
"Blue Component" : 0.52502274513244629
},
"Ansi 12 Color" : {
"Green Component" : 0.50962930917739868,
"Red Component" : 0.44058024883270264,
"Blue Component" : 0.51685798168182373
View wp-integ-test-info.md

Unit test example installation

Be sure you have php and mysql installed on your mac/PC

After scaffolding with wp-cli, run

bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
View 0-toc.md
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
      • ?