Skip to content

Instantly share code, notes, and snippets.

@w33ble
w33ble / index.html
Created September 20, 2017 23:37
rgb demo
<!DOCTYPE html>
<html>
<head>
<title>Addressable RGB LED</title>
<script src="serial.js"></script>
<script src="rgb.js"></script>
</head>
<body>
<p>
<button id="connect">Connect</button> <span id="status"></span>
@w33ble
w33ble / dbprune.js
Last active January 12, 2018 17:40
Pruning Dickbars - Bookmarklet Code
// version 4-2017.18
(function dbprune() {
// restore page scrolling
var body = document.body;
var html = body.parentElement;
body.style['overflow'] = body.style['overflow-y'] = 'auto';
html.style['overflow'] = html.style['overflow-y'] = 'auto';
// check if this is a mobile display
var mHeight = 680;
@w33ble
w33ble / design thinking.md
Last active April 27, 2024 05:30
Design Thinking

Design Thinking

A structured guide to the stuff you do anyway

design thinking diagram


Empathize

@w33ble
w33ble / output.txt
Created May 30, 2017 18:49
module.exports use in kibana
Searching 2612 files for "module.exports" (regex)
src/cli/cluster/cluster_manager.js:
8 process.env.kbnWorkerType = 'managr';
9
10: module.exports = class ClusterManager {
11 constructor(opts = {}, settings = {}) {
12 this.log = new Log(opts.quiet, opts.silent);
src/cli/cluster/worker.js:
@w33ble
w33ble / output.txt
Last active May 26, 2017 18:28
eslint-import-resolver-kibana output on Kibana
> kibana@6.0.0-alpha2 lint /repos/kibana
> grunt eslint:source
Running "eslint:source" (eslint) task
/repos/kibana/src/cli_plugin/cli.js
3:8 error No default export found in module import/default
/repos/kibana/src/cli_plugin/install/index.js
@w33ble
w33ble / like a boss.js
Created May 23, 2017 18:13
banch composed component
import React from 'react';
import PropTypes from 'prop-types';
import { compose, branch, renderComponent } from 'recompose';
import { Panel } from 'react-bootstrap';
import { ArgTypeUnknown } from './arg_type_unknown';
import { ArgTypeContextPending } from './arg_type_context_pending';
import { ArgTypeContextError } from './arg_type_context_error';
function checkState(state) {
return ({ context, expressionType }) => {
$ yum search fonts
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ocf.berkeley.edu
* extras: mirror.san.fastserv.com
* updates: centos.mirror.ndchost.com
============================== N/S matched: fonts ==============================
baekmuk-ttf-fonts-common.noarch : Common files for Korean Baekmuk TrueType fonts
baekmuk-ttf-fonts-ghostscript.noarch : Ghostscript files for Korean Baekmuk
@w33ble
w33ble / index.js
Created May 16, 2017 20:52
recompose example
import { renderComponent, branch, compose } from 'recompose';
import { MyComponent as Component } from './my_expression';
import { Loading } from '../loading';
const renderLoading = branch(
props => Boolean(props.loading), // bool, test for loading state
renderComponent(Loading)
);
const addProps = withProps((ownProps) => {
@w33ble
w33ble / rules.md
Last active May 10, 2017 18:47
Kibana issue and PR process

Release notes

For PRs, be sure to use add Closes #xxxx, and add the approrpiate labels

  • enhancement - User-facing enhancement
  • fix - Fixes a bug in a previous release
  • deprecation - Deprecates something that was in a previous release

Additional context can be added to the description in the following format:

@w33ble
w33ble / state_of_state.md
Created May 9, 2017 23:21
state of state, in markdown form

Local state vs app state

Local state is fine.

Redux [adds] indirection to decouple “what happened” from “how things change”

-- Dan Abramov - You Might Not Need Redux

When to introduce app state?