Skip to content

Instantly share code, notes, and snippets.

bitfade

Block or report user

Report or block bitfade

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View reports.txt
10 Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
8 Cannot read property \'type\' of undefined
7 Cannot read property \'replace\' of undefined
6 The object can not be found here.
5 Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.
5 Cannot set property \'onload\' of null
5 Cannot read property \'unbind\' of undefined
4 Cannot read property \'tagName\' of undefined
3 Failed to execute \'removeChild\' on \'Node\': The node to be removed is not a child of this node.
3
View change.jsx
componentDidUpdate: function ( prevProps ) {
// update value state on preview mode change or value changed (via props) by another component
if ((this.props.previewMode && this.props.previewMode !== prevProps.previewMode) || this.props.value !== prevProps.value) {
this.setState({
value: this.emptyIfDefault(this.getCurrentInputValue()),
});
}
},
@bitfade
bitfade / init.el
Last active Aug 29, 2015
Easy motion bug test
View init.el
(require 'package)
(package-initialize)
(require 'evil)
(require 'evil-easymotion)
(evil-mode 1)
(evilem-default-keybindings "SPC")
@bitfade
bitfade / gist:ee91d7e8aff16364b9ff
Created Mar 2, 2015
Custom WordPress Media Uploader
View gist:ee91d7e8aff16364b9ff
(function ($) {
"use strict";
/*global wp,jQuery */
var CustomGalleryEdit,CustomFrame;
function customClasses() {
var media = wp.media;
var l10n = media.view.l10n;
@bitfade
bitfade / gist:4555047
Last active Mar 31, 2019
WordPress - Remove empty p tags for custom shortcodes
View gist:4555047
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
@bitfade
bitfade / filter.js
Last active Oct 5, 2018
WordPress 3.5 media upload, toolbar with custom filter
View filter.js
/*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false */
/*global wp,jQuery */
jQuery(document).ready(function($) {
if (!window.wp || !window.wp.media) {
return;
}
var media = window.wp.media;
@bitfade
bitfade / gist:4460948
Last active Apr 3, 2017
WordPress 3.5 media upload api example
View gist:4460948
var workflow = wp.media({
title: 'Select the images',
// use multiple: false to disable multiple selection
multiple: 'add',
button: {
text: 'Add selected images'
},
library: {
type: 'image'
}
View XmlParser.as
/*
Author: bitfade
this class will convert a XML configuration in to a simpler object
*/
package bitfade.utils {
import flash.xml.*
public class XmlParser {
You can’t perform that action at this time.