Skip to content

Instantly share code, notes, and snippets.

View jtsternberg's full-sized avatar
😎
Awesome Motive-ing

Justin Sternberg jtsternberg

😎
Awesome Motive-ing
View GitHub Profile
@jtsternberg
jtsternberg / CMB2 - Claude for OSS Gist.md
Created February 28, 2026 03:27
CMB2: Case for Claude for Open Source Program

CMB2: Why It Qualifies for Claude for Open Source

The Short Version

CMB2 is a developer toolkit for WordPress custom fields, metaboxes, settings pages, and forms. What makes it unique in the WordPress ecosystem is that it was purpose-built to be safely bundled inside other plugins and themes. Hundreds of WordPress products ship CMB2 as an embedded dependency — and its WP Lib Loader pattern automatically resolves version conflicts so only the newest copy loads, even when multiple plugins include it.

CMB2 doesn't meet the 5K GitHub stars threshold because WordPress developers don't install via GitHub — they install via wordpress.org and Composer, or more often, they never install it directly at all. It arrives inside something else. Our real adoption numbers tell a different story.

Adoption Across Platforms

@jtsternberg
jtsternberg / GOTCHAS.md
Created February 25, 2026 02:42
Claude Code skill for beads SQLite → Dolt migration (steveyegge/beads#2096)

Migration Gotchas

Known pitfalls discovered during real migrations. Read this if any step fails unexpectedly.

bd init --from-jsonl is broken (v0.56.1)

Reports success but imports 0 issues. Filed as #2096. Use the bundled scripts/jsonl-to-dolt.py instead.

bd init refuses if beads.db exists

@jtsternberg
jtsternberg / jsonl-to-dolt.py
Created February 25, 2026 02:40
Workaround for beads v0.56.1 bd init --from-jsonl importing 0 issues (steveyegge/beads#2096)
#!/usr/bin/env python3
"""
Import beads issues from a JSONL file into a Dolt database via SQL.
Usage:
python3 scripts/jsonl-to-dolt.py <jsonl_path> <database_name> [--host HOST] [--port PORT] [--user USER]
Requirements:
- dolt CLI installed (brew install dolt)
- Dolt server running on specified host:port
@jtsternberg
jtsternberg / README.md
Created January 29, 2026 15:50
git-worktree - Git worktree management with dependency symlinks

Git Worktree Guide

Work on multiple branches simultaneously without switching branches or duplicating dependencies.

Quick Start

# Create a worktree for an existing branch
/git-tree feature-branch
@jtsternberg
jtsternberg / merge-repos.bash
Last active January 31, 2023 21:54
Merge Git Repos (Child into Parent)
#!/usr/bin/env bash
# =============================================================================
# Merges CHILD repo into PARENT.
# By Justin Sternberg <me@jtsternberg.com>
#
# Version 0.1.0
#
# Uses: https://github.com/newren/git-filter-repo
# References:
# * https://peterbabic.dev/blog/merge-repos-using-git-filter-repo/
@jtsternberg
jtsternberg / log-colors-group.js
Last active February 8, 2022 22:51
Log colors to console (and show colors) in a group
var colors = ['#EC0089','#0C1127','#00cfed'];
console.group('colors', {colors});
colors.forEach(c => console.log(`%c `,
`
display: block;
background: ${c};
width: 5px;
height: 5px;
padding: 5px 5px;
`
@jtsternberg
jtsternberg / video-overlay-click-play.html
Created November 18, 2021 19:31
Image placeholder overlay over video, click to play
<html>
<head>
<style>
.placeholder {
position: relative;
display: inline-block;
}
.placeholder:not(.placeholder-hide):after {
background: rgba(255,255,255,.8) url("https://upload.wikimedia.org/wikipedia/commons/b/b8/YouTube_play_button_icon_%282013%E2%80%932017%29.svg") no-repeat center center;
@jtsternberg
jtsternberg / om-autopopulate-from-query-params.js
Created September 30, 2021 14:17
Autopopulate OM optin fields from query params
document.addEventListener('om.Form.init', function(evt) {
console.log('om.Form.init')
var Form = evt.detail.Form;
var getQueryParam = function( param ) {
if (!getQueryParam.params) {
getQueryParam.params = {};
var query = window.location.search.substring(1);
var parts = query ? query.split('&').map(s => s.split('=')) : []
@jtsternberg
jtsternberg / biblegateway-links-shortcode-mods.php
Created August 5, 2021 18:22
BibleGateway Links Shortcode modifications
@jtsternberg
jtsternberg / hubspot-optinmonster-custom-html-integration.html
Created April 28, 2021 21:31
hubspot optinmonster custom html integration
<!--[if lte IE 8]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script>
(function() {
var addForm = function() {
window.hbspt.forms.create({
sfdcCampaignId: '70130000000ep2ZZZ',
portalId: '102310',
formId: '190ga042-56fc-4897-bed4-86ea519cb3e9',