Skip to content

Instantly share code, notes, and snippets.

View mike-at-redspace's full-sized avatar
🎧

Mike Vardy mike-at-redspace

🎧
View GitHub Profile

Scaled Agile Framework Cheatsheet

What is SAFe 6.0?

  • SAFe 6.0 is the latest version of the Scaled Agile Framework, a knowledge base of proven, integrated principles, practices, and competencies for achieving business agility using Lean, Agile, and DevOps .
  • SAFe 6.0 helps enterprises thrive in the digital age by delivering innovative products and services faster, more predictably, and with higher quality.
  • SAFe 6.0 provides guidance on how businesses and employees can grow and respond to change.
  • What's new in SAFe 6.0?
    • SAFe 6.0 introduces seven core competencies of Business Agility: Customer Centricity, Enterprise Solution Delivery, Agile Product Delivery, Team and Technical Agility, Organizational Agility, Continuous Learning Culture, and Lean-Agile Leadership.
  • SAFe 6.0 incorporates the Objectives and Key Results (OKR) methodology to align strategic goals with day-to-day operations and track progress towards achieving those objectives.
@mike-at-redspace
mike-at-redspace / MyComponent.js
Last active March 30, 2023 06:51
Poorman's hashrouter
import useRememberState from './useRememberState';
const MyComponent = () => {
const [value, setValue] = useRememberState('myKey', 'defaultValue');
const handleChange = event => {
setValue(event.target.value);
};
return (
const bubbleSortObjects = (arr, key) => {
let swapped
const swap = i => {
;[arr[i], arr[i + 1]] = [arr[i + 1], arr[i]]
swapped = true
}
do {
swapped = false
for (let i = 0; i < arr.length - 1; i++) {
const a = arr[i][key]
@mike-at-redspace
mike-at-redspace / server.js
Last active March 8, 2023 09:22
Worker Threads in Node.js 18
const http = require('http');
const { Worker } = require('worker_threads');
const slowApiEndpoint = 'https://api.example.com/slow-endpoint';
http.createServer((req, res) => {
if (req.url === '/api-data') {
const worker = new Worker('./slow-api-worker.js');
worker.on('message', (data) => {
res.writeHead(200, { 'Content-Type': 'application/json' });

npm install express body-parser jsonwebtoken node-localstorage express-rate-limit

import sha256 from 'crypto-js/sha256';
import Regl from 'regl';
const signals = {
pixelRatio: window.devicePixelRatio || 1,
userAgent: window.navigator.userAgent,
language: window.navigator.language,
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
screenWidth: window.screen.width,
screenHeight: window.screen.height,
function ResultsChart({ votes }) {
// Use a charting library or create your own chart component
return (
<div>
<h2>Results:</h2>
<p>Option 1: {votes.option1}</p>
<p>Option 2: {votes.option2}</p>
<p>Option 3: {votes.option3}</p>
</div>
);
@mike-at-redspace
mike-at-redspace / Example.js
Last active February 10, 2023 11:10
React lazy and Suspense
import React, { lazy, Suspense } from 'react'
import useIntersectionObserver from './useIntersectionObserver'
const AboveTheFold = () => (
<div>
<h1>This is the AboveTheFold content</h1>
<p>It will be rendered immediately when the page loads</p>
</div>
)
@mike-at-redspace
mike-at-redspace / App.jsx
Last active March 1, 2023 16:50
Import on Interaction
import React, { useState } from 'react'
import useScript from './useScript'
import useFirstInteraction from './useFirstInteraction'
const App = () => {
const [{ loaded, error }, triggerScript] = useScript('<url-to-script>')
useFirstInteraction(() => {
triggerScript()
}, 5)
@mike-at-redspace
mike-at-redspace / example.py
Last active February 2, 2023 23:20
Catch exceptions
while True:
try:
subtrack = int(input("Enter a digit between 1 and 10 to subtract: "))
if subtrack < 0:
print("Please enter a positive number")
continue
elif 0 < subtrack <= 10:
break
else:
print("Please enter a number between 1 and 10")