Skip to content

Instantly share code, notes, and snippets.

{
"presets": [
["env", {
"targets": { "node": 8 },
"useBuiltIns": true
}],
"stage-0",
"react"
],
"plugins": [
@Nantris
Nantris / gist:1747b882b3897d7a8f9524249684a45f
Created July 19, 2018 18:02
dmesg output Mint 19 - Vmware 14
~ $ dmesg
[ 0.000000] Linux version 4.15.0-20-generic (buildd@lgw01-amd64-039) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 (Ubuntu 4.15.0-20.21-generic 4.15.17)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.15.0-20-generic root=/dev/mapper/mint--vg-root ro quiet splash
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] Disabled fast string operations
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
import { Editor } from 'slate-react'
import { Value } from 'slate'
import React from 'react'
import initialValue from './value.json'
import { isKeyHotkey } from 'is-hotkey'
import { Button, Icon, Toolbar } from '../components'
/**
* Define the default node type.
@Nantris
Nantris / gist:566ff20583b3ea271565b6241d45dc92
Created November 2, 2018 21:14
Slate #2260 error stack
Uncaught Error: `Node.assertPath` could not find node with path or key: null
at Document.ElementInterface.(:8080/anonymous function) [as assertPath] (http://localhost:8080/main-aa87fe22906ca75136c8.js:176320:13)
at Commands$3.(:8080/anonymous function) (http://localhost:8080/main-aa87fe22906ca75136c8.js:171017:25)
at Editor.command (editor.js:148)
at Editor$$1.command (editor.js:209)
at Editor$$1.command (createPrototypeProxy.js:44)
at onCommand (commands.js:21)
at next (editor.js:276)
at Editor.run (editor.js:325)
at Editor.command (editor.js:156)
/**
* Webpack config for production electron main process
*/
import path from 'path';
import webpack from 'webpack';
import merge from 'webpack-merge';
import UglifyJSPlugin from 'uglifyjs-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import baseConfig from './webpack.config.base';
import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
/**
* Base webpack config used across other specific configs
*/
import path from 'path';
import webpack from 'webpack';
import merge from 'webpack-merge';
import externals from './externals';
const rootPath = process.cwd();
ERROR in main.prod.js from UglifyJs
TypeError: Cannot read property 'name' of undefined
at eval (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:9283:61)
at all (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:263:14)
at join_object_assignments (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:9282:26)
at join_consecutive_vars (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:9340:33)
at tighten_body (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:8386:17)
at eval (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:13560:47)
at AST_Arrow.eval [as optimize] (eval at <anonymous> (C:\projects\myApp\node_modules\uglify-es\tools\node.js:21:1), <anonymous>:7677:23)
at Compressor.before (eval at <anonymous> (C:\
@Nantris
Nantris / js
Created January 18, 2019 20:05
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import { createHashHistory } from 'history';
import { routerMiddleware, routerActions } from 'connected-react-router';
import { createLogger } from 'redux-logger';
import {
forwardToMain,
forwardToRenderer,
triggerAlias,
replayActionMain,
@Nantris
Nantris / SlateAndroidBugTemplate.md
Last active May 2, 2019 00:36
Slate Android Bug Report Template

Bug: (Insert the title of your bug here)

Severity

(SHOWSTOPPER, MAJOR, MINOR, TRIVIAL)

Rationale for severity

(Why did you choose the selected severity?)

Recording

import Debug from 'debug'
import invariant from 'tiny-invariant'
import isPlainObject from 'is-plain-object'
import warning from 'tiny-warning'
import { List } from 'immutable'
import CommandsPlugin from '../plugins/commands'
import CorePlugin from '../plugins/core'
import Operation from '../models/operation'
import PathUtils from '../utils/path-utils'