Skip to content

Instantly share code, notes, and snippets.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/drew/Repo/thirdhome-emails/node_modules/.bin:/Users/drew/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle [email protected]~build: CWD: /Users/drew/Repo/thirdhome-emails
ar el = wp.element.createElement,
Fragment = wp.element.Fragment
registerBlockType = wp.blocks.registerBlockType,
RichText = wp.editor.RichText,
BlockControls = wp.editor.BlockControls,
AlignmentToolbar = wp.editor.AlignmentToolbar,
MediaUpload = wp.editor.MediaUpload,
InspectorControls = wp.components.InspectorControls,
PanelColor = wp.editor.PanelColor,
@noltedesign
noltedesign / customblock.js
Created August 23, 2018 16:51
Create Gutenberg custom block
var el = wp.element.createElement,
Fragment = wp.element.Fragment
registerBlockType = wp.blocks.registerBlockType,
RichText = wp.editor.RichText,
BlockControls = wp.editor.BlockControls,
AlignmentToolbar = wp.editor.AlignmentToolbar,
MediaUpload = wp.editor.MediaUpload,
InspectorControls = wp.components.InspectorControls,
PanelColor = wp.editor.PanelColor,
// Add responsive background image code
function responsive_bg_styles($attachment_id, $selector) {
$srcset = wp_get_attachment_image_srcset($attachment_id);
$sets = explode(', ', $srcset);
if (is_array($sets)) {
$set_build = array();
foreach ($sets as $set) {
class EventsController < ApplicationController
before_filter :authenticate_user!
def index
end
def show
@event = Event.find_by_id(params[:id])
end