Skip to content

Instantly share code, notes, and snippets.

View HoverBaum's full-sized avatar
🌳
 I like 🌳🌳🌳 

Hendrik HoverBaum

🌳
 I like 🌳🌳🌳 
View GitHub Profile
const generateAssetsList = (posts, baseUrl, simpleLog = console.log) => new Promise(async resolve =>{
const apiURL = `${baseUrl.replace(/\/$/, '')}/wp-json/wp/v2/media`
simpleLog('Reducing posts to asset numbers')
let infosFetched = 0
// First add the featured_media images and get ther URLs.
const featuredAssets = await Promise.all(posts.reduce((all, post) => {
if (!post.featured_media) return all
return all.concat([{
mediaNumber: post.featured_media,
const createAndPublishCategories = async (categories, spaceId, managementToken, simpleLog = console.log) => {
const client = contentful.createClient({
accessToken: managementToken,
logHandler: (level, data) => simpleLog(`${level} | ${data}`)
})
const space = await client.getSpace(spaceId)
const createdCategories = await Promise.all(categories.map(category => new Promise(async resolve => {
let cmsCategory
try {
cmsCategory = await space.createEntry('blogCategory', {

outline for "The rise of headless CMS"

Motivation

Should contain what CMS are and motivate that they are great.

Old days

Story telling time of what used to be a pain for me when working with CMS to motivate the move from traditional CMS to headless.

@HoverBaum
HoverBaum / 1st-Readme.md
Created April 9, 2018 09:44
Mongo using Docker.

Mongo using Docker

This gist detailes scripts you can use to run a Mongo instance for your development using docker.

The provided scripts help you to create, run, stop and interact with a local mongo Database. You should keep in mind that all data is stored inside the Docker container and will be lost when you destroy it.

#!/bin/bash
<< ////
The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
that the SDK license was accepted by the user.
Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new
license hash.
Legally if you run this script (or your own version of it), it means YOU accepted the license - don't trust someone else.
The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine, after you
@HoverBaum
HoverBaum / blog_feature.txt
Created March 17, 2023 20:43
Wildcard files for prompt experiment.
cyberdeck
glowing eyes
cyber implant
nanoblades
face tattoo
flashy
bald head
energy staff
cyber-syringes
@HoverBaum
HoverBaum / popover-titles.css
Created November 6, 2023 13:16
Display inline titles inside popovers.
/* Display inline titles inside popovers */
.hover-popover .inline-title {
display: block;
}
/* Uncomment the below for inline titles inside inline embeds */
/*
.inline-embed .inline-title {
display: block;
}