Skip to content

Instantly share code, notes, and snippets.

APB: Ansible Playbook Bundle (Ansible, Framework)
FCOS: Fedora CoreOS (Red Hat, Host/Container OS)
CRD: Custom Resource Definition (Kubernetes, Concept)
CDK: Red Hat Container Development Kit (Red Hat, Tooling)
DC: DeploymentConfig (Kubernetes, Concept, Tooling)
OKD: Kubernetes distribution that powers Openshift Origin
CNS: Container Native Storage (https://keithtenzer.com/2017/03/29/storage-for-containers-using-container-native-storage-part-iii/)
PVC: PersistentVolumeClaim (https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
CSI: Container Storage Interface (Standard, Concept)
RC: ReplicationController (Kubernetes, Framework)
<!DOCTYPE html>
<script src="https://cdn.jsdelivr.net/npm/d3-require@1"></script>
<script>
(async()=>{
/*
Ported from https://observablehq.com/@d3/sankey-diagram@278
Copyright 2018–2020 Observable, Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@mootari
mootari / observable-style.css
Created May 24, 2020 19:49
Monokai for ObservableHQ
/* ==UserStyle==
@name Monokai for Observable
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Overrides the Observable CodeMirror theme with Monokai.
@author -
==/UserStyle== */
@-moz-document domain("observablehq.com") {
/* Based on Sublime Text's Monokai theme */
@mootari
mootari / content-snippet.js
Last active March 17, 2024 14:14
Content Snippet that bundles the current page's stylesheets and assets into a zip file.
(async()=>{
const customCss = `
#title-heading {clear:left}
`;
const asyncArray = (iter, map) => Promise.all(Array.from(iter, map));
const css = (await asyncArray(
document.querySelectorAll('link[rel="stylesheet"][href^="/"]'),
async n => (await fetch(n.href, {mode: 'no-cors'})).text()
)).join("\n").replace(/\/\*.*?\*\//gs, '');
@mootari
mootari / serialize.js
Last active May 4, 2018 18:19
Inlining objects in Javascript.
// Recursively inlines Function, RegExp and undefined.
function serialize(value) {
const type = typeof value;
const json = JSON.stringify;
if(type === 'function') {
return value.toString();
}
if(type === 'object') {
if(value === null) {
function getMaterial(uniformsCallback) {
const material = new THREE.MeshStandardMaterial(/* ... */);
material.onBeforeCompile = shader => {
shader.uniforms.time = { value: 0 };
if(uniformsCallback) uniformsCallback(shader.uniforms);
shader.fragmentShader = applyPatches(shader.fragmentShader, {
'varying vec3 vViewPosition;': `$&
uniform float time;
`
@mootari
mootari / SA-CORE-2018-004.patch
Created April 25, 2018 17:29
Patch without changelog / version.
From 080daa38f265ea28444c540832509a48861587d0 Mon Sep 17 00:00:00 2001
From: David Rothstein
Date: Wed, 25 Apr 2018 11:30:53 -0400
Subject: SA-CORE-2018-004 by alexpott, Heine, larowlan, David_Rothstein, xjm,
Pere Orga, mlhess, tim.plunkett, Jasu_M, quicksketch, cashwilliams,
samuel.mortenson, pwolanin, drumm, dawehner
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 06acf93..d5963a0 100644
@mootari
mootari / tags.v3.1.0.json
Created January 20, 2018 01:31
Babylon.JS class tags
{
"Node": [
"AbstractMesh",
"AnaglyphArcRotateCamera",
"AnaglyphFreeCamera",
"AnaglyphGamepadCamera",
"ArcRotateCamera",
"Camera",
"DeviceOrientationCamera",
"DirectionalLight",
const app = require('assemble')();
app.use(require('./task-namespace')());
// Shared init task for all sources.
app.task('init', function(next) {
//app.layouts(abs(config.layouts));
//app.partials(abs(config.partials));
next();
});
@mootari
mootari / content-toc-item.hbs
Last active January 14, 2018 18:51
Handlebars docblock
{{!--
! A single TOC item.
!
! @param {string} this.slug - Anchor ID
! @param {string} this.content - The heading text.
! @param {array} [this.children] - Optional subheadings.
--}}
<li>
<a href="#{{slug}}">{{content}}</a>
{{#if children}}