Skip to content

Instantly share code, notes, and snippets.

View kellymears's full-sized avatar

Kelly Mears kellymears

View GitHub Profile
# Finder: show full path in title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: allow text selection in Quick Look
@kellymears
kellymears / .stylelintrc.cjs
Last active May 16, 2023 08:25
sage bootstrap
module.exports = {
extends: ['@roots/bud-sass/config/stylelint'],
rules: {
'import-notation': null,
'no-empty-source': null,
},
};
@kellymears
kellymears / .pnpmfile.cjs
Created April 12, 2023 15:42
bud.js pnpm compatibility shim
const { dependencies, devDependencies } = require(`./package.json`);
/**
* bud.js pnpm compatibility shim
*
* pnpm allows customizing the package installation process through special functions called hooks.
* These hooks can be defined in a .pnpmfile.cjs file, which should be located in the same directory
* as the lockfile. For example, in a monorepo with a shared lockfile, the .pnpmfile.cjs file should
* be placed in the root of the monorepo.
*
const value = () => {
console.log('gist import works');
}
export default value
/**
* build.module.rules.after
*/
module.exports = async (config) =>
config
/**
* .mjs handling
*/
.hooks.on('build.module.rules.after', (rules) => [
...rules,
import {globby} from '@roots/bud-support'
import {readFile, readJsonSync} from 'fs-extra'
import {join} from 'path'
describe('repo', function () {
describe('publish check: */lib/cjs/index.js', () => {
globby
.globbySync('packages/@roots/*', {
absolute: true,
onlyDirectories: true,
/** @wordpress */
import {__} from '@wordpress/i18n'
import {RichText} from '@wordpress/block-editor'
/** Modules */
import PropTypes from 'prop-types'
/** Components */
import Buttons from '@blocks/ndn-page-header/components/Buttons'
@kellymears
kellymears / rxjs-sharp-wordpress.js
Last active May 16, 2020 02:42
Asynchronously process a set of images using rxjs and sharp
const fs = require('fs-extra')
const sharp = require('sharp')
const globby = require('globby')
const {Observable, from} = require('rxjs')
const {concatMap} = require('rxjs/operators')
const pino = require('pino')
const prettifier = require('pino-pretty')
/**
* Logger util
const chalk = require('chalk')
const fs = require('fs-extra')
const sharp = require('sharp')
const globby = require('globby')
/**
* Where to get dem piccies.
*/
const SITE_PATHS = [
`web/app/uploads/**/*.jpg`,