Skip to content

Instantly share code, notes, and snippets.

@moufmouf
moufmouf / .gitlab-ci.yml
Created February 22, 2017 17:53
Files from "A practical guide to continuous integration in PHP"
image: tetraweb/php:7.0
services:
- mysql:5.6
variables:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: my_db
before_script:
@luizcarraro
luizcarraro / open-external-link.js
Created July 27, 2017 11:37
ELECTRON: Open link in external default OS browser
@pento
pento / php-block.js
Last active March 20, 2025 14:59
Converting a shortcode to a block: this method is fast to do, but a mediocre UX. You should only use this as a stopgap until you can implement a full block UI.
// License: GPLv2+
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
ServerSideRender = wp.components.ServerSideRender,
TextControl = wp.components.TextControl,
InspectorControls = wp.editor.InspectorControls;
/*
* Here's where we register the block in JavaScript.
@ajvillegas
ajvillegas / 01-custom-block.js
Last active December 14, 2024 02:17
Sample custom WordPress editor block and sidebar controls using using ES5 JavaScript syntax.
/**
* Custom WordPress block boilerplate.
*
* @package My_Block_Package
* @author Alexis J. Villegas
* @link http://www.alexisvillegas.com
* @license GPL-2.0+
*/
( function( blocks, editor, element ) {