Skip to content

Instantly share code, notes, and snippets.

View mturley's full-sized avatar

Mike Turley mturley

View GitHub Profile
@mturley
mturley / 1-plexbox-setup-README.md
Last active December 19, 2023 22:07
Ubuntu Server plexbox setup

Start with a fresh Ubuntu Server 16.04 installation. NOTE: In the commands and files below, be sure to replace <yourusername> with your username and <yourgroupname> with your group name (probably the same as your username). Also, replace <yourhostname> with your server's hostname.

Install Dependencies:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt update
@mturley
mturley / pf-v4-v5-compat-strategy.md
Last active November 17, 2022 18:37
PatternFly v4 / v5 / next coexisting with versioned interop classes on components/layouts

I just wanted to write down my thoughts about a possibly-naive but simple approach we could theoretically take to support PF4/PF5/Next component styles existing on the same page.

To be clear: I have not learned much about CSS layers or CSS modules, so this may be better achieved with something fancier. However, this would work without any browser compatibility concerns.

Proposal:

  • We release a transitional compatibility-version of PF4 that is identical to the last PF4 version except for the addition of .pf-v-4 version classes on every component/layout style rule.
    • This is technically a breaking change for core CSS/HTML consumers, but React consumers could simply upgrade the packages and not have to change their usage at all (component APIs would remain identical, the rendered DOM would match the new CSS).
  • If we are adhering to proper BEM classes for descenant elements of a component/layout, we should only need to apply this special class to the top of each component/layout unless we need to suppo
@mturley
mturley / tackle-minikube-setup.sh
Last active October 26, 2022 20:19
Tackle minikube setup script
#!/bin/sh
minikube config set memory 10240
minikube config set cpus 4
minikube stop
minikube delete
minikube start --addons=dashboard --addons=ingress --addons=olm
@mturley
mturley / console-extensions-v0.0.3.md
Last active April 26, 2022 20:59
OpenShift Console Dynamic Plugin SDK - Docs for console-extensions.json as of v0.0.3
@mturley
mturley / arrow-functions-and-equality.js
Created June 24, 2018 13:20
More ranting about JavaScript for Jenn
/*
Jenn, I was looking back on the github examples I gave you and realized one more thing:
If you didn't know it already, the ES6 arrow function syntax, has two shorthands
the first one I showed in my example already:
*/
const arrowFn = () => { };
const arrowFn = () => { return thing; };
@mturley
mturley / gist:b95fccae1a8aa4e10121dd36f0296993
Last active June 22, 2020 15:28
Development resources for reproducing Kogito table performance issues

Hi guys, let me know if there is a more appropriate channel for this but I figured we could have a place for async discussion around the Kogito PF stuff within UXD.

For those who want to set up and run the Kogito UI code locally, it's pretty simple. Here's how you can pull down the branches I've been working on with Ajay:

git clone https://github.com/kiegroup/kogito-apps
cd kogito-apps
git remote add mturley https://github.com/mturley/kogito-apps
git fetch mturley
git checkout KOGITO-new-tabledesign
@mturley
mturley / make-tests.sh
Last active July 31, 2019 21:23
Script for getting started with unit tests in a directory full of new JS code
#!/usr/bin/env bash
pwd
mkdir -p ./__tests__
for file in *
do
if test -f "$file" && [[ $file == *.js ]]
then
testfile="./__tests__/${file/\.js/.test.js}"
if test -f "$testfile"
@mturley
mturley / imperative-vs-declarative.md
Last active June 25, 2019 21:08
Imperative vs. Declarative Programming: The Value of React for Developers

Imperative vs Declarative Programming

The Value of React for Developers

Writing code for what we want the page to do, not how we want the browser to do it.

Basic concepts

I've been working on how to try and explain the fundamental difference between the following two concepts of how programming the interactions on a web page can be done. It's important to grasp both in order to understand the main benefit of React from a developer's perspective. There are also design benefits of React such as the ability to reuse and compose isolated components, but that is beyond the scope of this document.

@mturley
mturley / gist:c7348e5d31e63d7360b2f2ee493c5928
Created July 22, 2018 23:37
Errors running webpack-dev-server
ERROR in /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/graphql-language-service-utils/dist/validateWithCustomRules.js
Module not found: Error: Can't resolve 'graphql/validation/rules/ExecutableDefinitions' in '/Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/node_modules/graphql-language-service-utils/dist'
@ /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/graphql-language-service-utils/dist/validateWithCustomRules.js 20:18-75
@ /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/graphql-language-service-utils/dist/index.js
@ /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/graphql-language-service-interface/dist/getDefinition.js
@ /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/graphql-language-service-interface/dist/index.js
@ /Users/mturley/.rvm/gems/ruby-2.4.2/bundler/gems/manageiq-graphql-5f68621f2791/~/codemir