Skip to content

Instantly share code, notes, and snippets.

View BobD's full-sized avatar

Bob Donderwinkel BobD

View GitHub Profile
@BobD
BobD / migrate.js
Last active October 28, 2021 08:08
const {
getContentfulAssetsById,
getContentfulTagsById,
getEntryTags,
getExistingArticleIdBySlug,
getAssetFileName,
getContentfulNode
} = require('./migrate.utils');
const currentContentfulData = require("./contentful-export.json");
const inputChunks = [];
const { exec } = require("child_process");
const inputChunks = [];
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", (chunk) => inputChunks.push(chunk));
process.stdin.on("end", function () {
const inputJSON = inputChunks.join("");
const prismicData = JSON.parse(inputJSON);
const curlCommand = getCurlToDownloadAllImages(prismicData);
@BobD
BobD / gist:e51edd989e43aaf3d74d
Last active August 29, 2015 14:05
Some Gulp.js which reworks a tad of BEM CSS so you can use multiple Modifiers in a single BEM class
/*
Some Gulp.js which reworks a tad of BEM CSS so you can use multiple Modifiers in a single BEM class
Some BEM CSS like this:
.__block{display: block;}
.__block__element{display: inline-block;}
.__block__element_color-1{color: yellow;}
.__block__element_background-2{background: Green;}
.__block__element_font-3{font-family: Arial;}