Skip to content

Instantly share code, notes, and snippets.

View bleathem's full-sized avatar

Brian Leathem bleathem

View GitHub Profile
@bleathem
bleathem / observable-redux-action-timing.js
Created January 18, 2018 22:47
Sample code to show the sequence in which observable-redux dispatched events are reduced.
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
import { createEpicMiddleware, combineEpics } from 'redux-observable';
const makeActionCreator = (type, ...argNames) => {
return function (...args) {
console.log('Creating action', type, args[0]);
const action = { type };
argNames.forEach((arg, index) => {
action[argNames[index]] = args[index];
});
[
{
"city": "Olathe",
"region": "Kansas"
},
{
"city": "Warren",
"region": "Michigan"
},
{
@bleathem
bleathem / adding-patternfly.md
Created April 12, 2017 22:59
Adding PatternFly to an existing project

Adding PatternFly to an existing project

The easiest option is to install and then link directly to the node_modules path.

  1. Add dependency for patternfly:
npm install --save patternfly

OR Update list of dependencies in package.json to include:

@bleathem
bleathem / pf-webcomponent-native.md
Last active February 28, 2017 19:01
PatternFly Web Components / Framework-Native Proposal

PatternFly Web Components / Framework-Native Proposal

Where we stand

The PatternFly roadmap outlines a proposal to scale framework support by adopting a Web Component based solution for implementing pattern behaviours to support multiple web frameworks.

By building prototypes for PatternFly-webcomponents, we have shown that framework integration of web components is possible, but benefits from the introduction of framework-specific shims to provide application developers with a framework-native experience when consuming the web components.

The problem

Front-end developers are by-and-large in favor of the web component approach for implementing pattern behaviours. However, we need to achieve a critical mass of pattern implementations in order for developers to adopt the solution and begin contributing back their own implementations.

<ul class="list-inline">
{{# listitems.five }}
<li class="list-inline-item" style="border: 1px solid gray; padding: .25em;">
{{> basics-tag tagText=name.first tagClass="tag-info" tagDismissable="true" }}
</li>
{{/ listitems.five }}
</ul>
$ fhcap cluster create --git-ref=8af48e242b62c1f62d7dd3f104577e8d4364fa25 --name=wfm-cluster-1
Cluster::Generate: name = wfm-cluster-1
Cluster::CreateEnvironment: cluster = wfm-cluster-1, environment = single, domain = wfm.skunkhenry.com
Chef::Environments::Create name = wfm-cluster-1-single, type = single, domain = wfm.skunkhenry.com
skip fhcap/repos/fhcap-dev/environments/wfm-cluster-1-single.json
identical fhcap/repos/fhcap-dev/data_bags/environments/wfm-cluster-1-single.json
skip fhcap/repos/fhcap-dev/organisations/wfm-cluster-1-single_passwords.json
identical fhcap/repos/fhcap-dev/organisations/wfm-cluster-1.json
Cluster::Create: name = wfm-cluster-1
Repo::Checkout: repo = fhcap, git-ref = 8af48e242b62c1f62d7dd3f104577e8d4364fa25, remote = origin
  • 2 : Trivial change (version bump, fix typo etc) No unknowns
  • 3 : Larger trivial change (small documentation update, one-liner code fix etc). No unknowns.
  • 5 : Small code change, very limited in scope across multiple components. No unknowns.
  • 8 : Large code change, limited to 1-2 components. No unknowns.
  • 13 : Large code change, spread across multiple components. No unknowns.
  • 20 : Large code change, not sure about the full scope of the required changes yet. There may be subtasks that I cannot populate yet because I don't know the full scope of the task.
  • 40 : Large code change, potentially very large. Full scope of the task is unknown and the unknowns could be large in the own-right.
  • 100: Potentially huge unknown code changes required. The full scope of the task is not known at all / requirements very unclear. The potential unknowns could be feature-sized.
options { url: 'https://openshift-master.summit.paas.ninja:8443/api/v1beta3/namespaces/demo3/pods',
auth: { :) },
method: 'get',
qs: {},
rejectUnauthorized: false,
strictSSL: false }
[ { metadata:
{ name: 'sketch-0-pod-1-32xza',
generateName: 'sketch-0-pod-1-',
namespace: 'demo3',
{"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1beta3","metadata":{"name":"doodle-24-pod-2-4gnka","generateName":"doodle-24-pod-2-","namespace":"demo2","selfLink":"/api/v1beta3/namespaces/demo2/pods/doodle-24-pod-2-4gnka","uid":"d2efeec0-0571-11e5-849a-12711c2c2e83","resourceVersion":"119070","creationTimestamp":"2015-05-28T19:43:33Z","labels":{"deployment":"doodle-24-pod-2","deploymentconfig":"doodle-24-pod"},"annotations":{"kubernetes.io/created-by":"{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1beta3\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"demo2\",\"name\":\"doodle-24-pod-2\",\"uid\":\"3a3eae02-056f-11e5-849a-12711c2c2e83\",\"apiVersion\":\"v1beta3\",\"resourceVersion\":\"119045\"}}","openshift.io/deployment-config.latest-version":"2","openshift.io/deployment-config.name":"doodle-24-pod","openshift.io/deployment.name":"doodle-24-pod-2"}},"spec":{"volumes":[{"name":"default-token-3bql9","secret":{"secretName":"default-token-3bql9"}}],"containers":[{"name":"doodle-24
{"type":"MODIFIED","object":{"kind":"Pod","apiVersion":"v1beta3","metadata":{"name":"docker-registry-1-jabo7","generateName":"docker-registry-1-","namespace":"default","selfLink":"/api/v1beta3/namespaces/default/pods/docker-registry-1-jabo7","uid":"8c6945d8-04b2-11e5-9799-12711c2c2e83","resourceVersion":"30206","creationTimestamp":"2015-05-27T20:54:21Z","labels":{"deployment":"docker-registry-1","deploymentconfig":"docker-registry","docker-registry":"default"},"annotations":{"kubernetes.io/created-by":"{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1beta3\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"default\",\"name\":\"docker-registry-1\",\"uid\":\"674d0de8-04b0-11e5-9799-12711c2c2e83\",\"apiVersion\":\"v1beta3\",\"resourceVersion\":\"29854\"}}","openshift.io/deployment-config.latest-version":"1","openshift.io/deployment-config.name":"docker-registry","openshift.io/deployment.name":"docker-registry-1"}},"spec":{"volumes":[{"name":"registry-storage","emptyDir":{}},{"name":"default-