Skip to content

Instantly share code, notes, and snippets.

View julrich's full-sized avatar
🍋
squeezing!

Jonas Ulrich julrich

🍋
squeezing!
View GitHub Profile
@julrich
julrich / visual.schema.json
Created October 14, 2021 09:02
Demo Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://frontend.ruhmesmeile.com/content/molecules/visual.schema.json",
"title": "Visual",
"description": "visual",
"type": "object",
"properties": {
"height": {
"title": "Height",
"type": "string",
@julrich
julrich / createCompnentsMap.js
Created September 29, 2021 18:22
Create a component map from JSON mapping
const fs = require('fs')
const path = require('path');
const baseExports = require('@kickstartds/base/lib/exports.json');
const blogExports = require('@kickstartds/blog/lib/exports.json');
const contentExports = require('@kickstartds/content/lib/exports.json');
const reducer = (mod) => (prev, [key, value]) => {
if (key !== "index.js" && key.indexOf('/') === -1 && value.length) {
prev += `'${key}': loadable(() => import('@kickstartds/${mod}/lib/${key}/index.js'), { resolveComponent: (exports) => exports.${value[0]} }),\n`
}
@julrich
julrich / README.md
Created September 25, 2021 18:15
Usage of `loadable()` for dynamic component resolution for pages

Description

exports.json files include maps to all published components, and for different modules (base, blog, content). This is used to look up the correct library folder and component name to resolve.

@julrich
julrich / Query
Created May 16, 2021 21:38
kickstartDS GraphQL-API PoC
query MyQuery {
allKickstartDsPage {
edges {
node {
content {
content {
... on CountUpComponent {
topic
text
to
@julrich
julrich / ruhmesmeile-startpage.yml
Last active May 9, 2021 20:24
ruhmesmeile Startseite als .md
Id: fd055920-b0fe-11eb-9ce8-bdbc5d8289d5
layout: default
heading: ruhmesmeile Startpage
content:
- mode: list
width: full
space-before: none
background: default
headline:
level: h2
@julrich
julrich / demo.js
Created April 25, 2021 11:19
Difference in basePropertyOf demo vs project
function basePropertyOf(e) {
return function (t) {
return null == e ? void 0 : e[t]
}
}
var _basePropertyOf = basePropertyOf,
...
deburrLetter = _basePropertyOf(deburredLetters),
@julrich
julrich / gist:5cf67c88994da90fcbb4fab1b2a2d477
Created April 24, 2021 19:15
Storybook + Vite Builder on Build Errorlog
info @storybook/react v6.3.0-alpha.14
info
info => Cleaning outputDir: /home/julrich/Projects/Frontend/code/kickstartDS/dist
info => Copying static files: ./legacy-instance => ./
info => Loading presets
info => Compiling manager..
vite v2.2.1 building for production...
transforming (1312) ../../@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/controls/react-editable-json-tree/components/JsonArray.jsConflicting namespaces: node_modules/@storybook/client-api/dist/esm/index.js re-exports 'combineParameters' from both node_modules/@storybook/client-api/dist/esm/index.js and node_modules/@storybook/client-api/dist/esm/parameters.js (will be ignored)
transforming (1941) ../../lodash/_baseFindIndex.jsConflicting namespaces: node_modules/@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/index.js re-exports 'components' from both node_modules/@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/index.js and node_modules/@storybook/addon-essentials/node_mo
@julrich
julrich / 01-Problem Description.md
Last active December 22, 2019 19:44
Lenovo Thinkpad P52 / Nvidia Quadro P3200 / KDE Neon 5.17.4

Getting a black screen after changing graphics driver to nvidia:

sudo prime-select nvidia
reboot

Last 2 messages I'm able to observe visibly (before it apparently hanging) include one reading as follows:

PKCS#7 signature not signed with a trusted key
@julrich
julrich / lib.navSidebar.ts
Last active August 4, 2020 12:51
Fully cached TYPO3 HMENU navigation example with expAll and 'active', 'current' states
#
# Main navigation in Sidebar
#
# General idea: Don't render & cache 'active' and 'current' states in 'expAll' menu, so it becomes cacheable
# over all pages. To regain 'active' and 'current' states, the result of the cached menu is parsed by
# 'stdWrap.replacement', utilizing specific information about the resulting menu item markup to insert them.
# Use COA to decouple the stdWrap ('lib.navSidebar.stdWrap.replacement') needed for RegExp replacement from
# the cached menu ('lib.navSidebar.10'). This way the complete menu can be generically cached without current
@julrich
julrich / patternlab-handlebars-config.js
Created March 29, 2018 11:06
@pattern-lab/engine-handlebars Custom Handlebars configuration file
module.exports = function (Handlebars) {
Handlebars.registerHelper('choose', function (a, b) { return a || b; });
};