Skip to content

Instantly share code, notes, and snippets.

@visualjeff
visualjeff / DataDockerfile
Created April 13, 2017 05:53
How to Dockerize your new scimgateway project
# To build: docker build --force-rm=true -t scimgateway-data:latest .
# To run: docker run -d --name scimgateway-data -t scimgateway-data:latest
FROM busybox:latest
MAINTAINER Jeffrey Gilbert
RUN mkdir -p /home/scimgateway/config
VOLUME /home/scimgateway/config
CMD ["echo", "Data container for scimgateway created and will now shutdown. No need to run again."]
@visualjeff
visualjeff / gist:412f89aecce959fd71513dbc809be3e4
Created January 27, 2021 04:20
Script for processing megaMenu. Save to root of forge project as index.js. Run as "node index.js"
// Note you may need to update the path to our sample data.
let data = require('./src/stories/menus/megaMenu/megamenu.json');
const sortByName = (a, b) => {
return a.name > b.name ? 1 : b.name > a.name ? -1 : 0;
};
// This function should be memoized for performance reasons.
const sortParent = (data) => {
let sortedData = [...data];