# 1. nuke
build/run db:nuke
# 2. rerun bootstrap
build/run bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exclude these files from the git repo | |
wp-content/backup/* | |
wp-content/cache/* | |
wp-content/upgrade/* | |
wp-content/uploads/* | |
sitemap.* | |
wp-config.php | |
# Hidden system files | |
*.DS_Store |
This gist documents one method for cache busting CSS components imported in a single CSS file in a WordPress project via PostCSS and Nodemon.
- project.css: shows the CSS componenents imported in a single file
- package.json: shows the npm dependencies and build scripts
- postcss.config.js: shows the postcss config
- functions.php: shows the versioning of the theme's
style.css
based on the file's last modified date
<link rel="icon" href="/favicon.ico"><!-- 32×32 -->
<link rel="icon" href="/icon.svg" type="image/svg+xml" sizes="any">
<link rel="apple-touch-icon" href="/apple.png"><!-- 180×180 -->
<link rel="manifest" href="/manifest.webmanifest">
We acknowledge the Lenape people, the traditional custodians of the land where the studio operates. We pay respect to their Elders past and present and to all indigenous people of this continent.
Frank Chimero, https://studiofrank.co/colophon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The long way to Array.prototype.indexOf(), written while making an image slide show | |
const images = [...document.querySelectorAll('[data-js="carousel-img"]')]; | |
const activeEl = images.filter((img) => img.classList.contains('active'))[0]; | |
const activeElIndex = images.reduce((acc, img, i) => { | |
return acc != undefined | |
? acc | |
: img.classList.contains('active') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When making a looping slide show, here's the long way to get at what the modulo operator provides | |
if (counter < images.length - 1) { | |
counter++; | |
} else { | |
counter = 0; | |
} | |
const prevIndex = counter < 1 ? images.length - 1 : counter - 1; | |
const currIndex = counter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dotenv = require('dotenv').config(); | |
const mongoose = require('mongoose'); | |
const fp = require('fastify-plugin'); | |
async function mongooseConnect(fastify, options, done) { | |
try { | |
await mongoose.connect(process.env.DB_URI); | |
console.log('DB connected!'); | |
} catch (err) { | |
console.log(err); |