Skip to content

Instantly share code, notes, and snippets.

View johngerome's full-sized avatar
👋
Hi

0x4e32 johngerome

👋
Hi
View GitHub Profile
@johngerome
johngerome / commit-conventions.md
Created May 11, 2025 13:24
conventional commits guide

Conventional Commits Guide

Introduction

Conventional commits provide a consistent way to structure commit messages, which helps with automation, release notes generation, and understanding the history of a project. The format adheres to the following structure:

<type>(<scope>): <message>
@johngerome
johngerome / cache-fonts.js
Created February 13, 2017 02:10
non-blocking fonts by caching it.
// to encode a font into Base64 use this tool https://www.npmjs.com/package/font-store
(function (window, document) {
'use strict';
var isModernBrowser = (
'querySelector' in document &&
'localStorage' in window &&
'addEventListener' in window
),
key = 'font',
@csswizardry
csswizardry / email.md
Last active September 5, 2018 14:31
I frequently get asked about over-abstracted CSS, and ‘can CSS be too modular’, so I thought I’d publish this anonymised email I received, along with my reply.
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);