Skip to content

Instantly share code, notes, and snippets.

View JanDW's full-sized avatar

Jan De Wilde JanDW

View GitHub Profile
danielpost / .eleventy.config.js
Created August 11, 2020 20:39
Eleventy: Purge CSS for each html file
const { PurgeCSS } = require('purgecss');
* Remove any CSS not used on the page and inline the remaining CSS in the
* <head>.
* @see {@link}
eleventyConfig.addTransform('purge-and-inline-css', async (content, outputPath) => {
if (process.env.ELEVENTY_ENV !== 'production' || !outputPath.endsWith('.html')) {
cmod /
Last active June 20, 2024 09:11 — forked from eddiewebb/
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to and press CMD-/ and start typing.

Fast Search

troyfontaine /
Last active June 21, 2024 20:03
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote