Skip to content

Instantly share code, notes, and snippets.

@miina
miina / index.js
Created September 3, 2019 17:12
Snapping try
/**
* External dependencies
*/
import classnames from 'classnames';
import PropTypes from 'prop-types';
/**
* WordPress dependencies
*/
import { Component } from '@wordpress/element';
/**
* This file is mainly copied from the default BlockMover component, there are some small differences.
* The arrows' labels are changed and are switched. Also, dragging is enabled even if the element is the only block.
*/
/**
* External dependencies
*/
import { first, partial, castArray } from 'lodash';
import classnames from 'classnames';
/**
* This file is mainly copied from the core's <Draggable> Component, there are various changes in onDragStart.
*/
/**
* External dependencies
*/
import { noop } from 'lodash';
/**
@miina
miina / sw.js
Created October 16, 2018 19:36
commenthandler
const commentHandler = ( { url, event, params } ) => {
return fetch( event.request )
.then( ( response ) => {
return response;
} )
.catch( ( err ) => {
const request = event.request;
const req = new Request(request.url, {
method: request.method,
headers: request.headers,

Keybase proof

I hereby claim:

  • I am miina on github.
  • I am miina (https://keybase.io/miina) on keybase.
  • I have a public key whose fingerprint is 8E6B EE38 1E25 0B39 3617 3396 F50E E506 A845 C2A4

To claim this, I am signing this object: