Skip to content

Instantly share code, notes, and snippets.

View margueriteroth's full-sized avatar
👩‍🌾

Marguerite Roth margueriteroth

👩‍🌾
View GitHub Profile
@margueriteroth
margueriteroth / new-virtualenv.js
Last active June 28, 2022 16:22
I never remember how to create and initiate a new virtual env with pyenv.
$ pyenv install 3.9.7
$ pyenv shell 3.9.7
$ pyenv virtualenv mynewenvname
$ pyenv shell --unset
$ pyenv local mynewenvname
$ python -V
3.9.7
@margueriteroth
margueriteroth / gatsby-node.js
Last active March 13, 2019 22:09
gatsby-node.js
const path = require('path');
const { createFilePath } = require(`gatsby-source-filesystem`);
exports.onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions;
if (node.internal.type === `MarkdownRemark`) {
const slug = createFilePath({
node,
getNode,
basePath: `posts` })