Skip to content

Instantly share code, notes, and snippets.

@maxfenton
maxfenton / pull-content
Created May 7, 2026 14:08
bin/pull-content
#!/usr/bin/env bash
# Pull content from production to local. READ-ONLY — never touches the server.
#
# Usage:
# bin/pull-content — dry run
# bin/pull-content --real — execute
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
@maxfenton
maxfenton / push-accounts-to-staging
Created May 7, 2026 14:07
bin/push-accounts-to-staging
#!/usr/bin/env bash
# Push local Panel accounts to staging.
# Defaults to dry run — shows what would change without touching the server.
#
# Usage:
# bin/push-accounts-to-staging — dry run
# bin/push-accounts-to-staging --real — execute
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
@maxfenton
maxfenton / push-content-to-production
Created May 7, 2026 14:07
bin/push-content-to-production
#!/usr/bin/env bash
# Push local content to production. ONE-TIME use at go-live to seed Kirby 4 content.
# After go-live, content flows the other way (panel edits → bin/pull-content).
# Defaults to dry run.
#
# Usage:
# bin/push-content-to-production — dry run
# bin/push-content-to-production --real — execute
set -euo pipefail
@maxfenton
maxfenton / push-content-to-staging
Created May 7, 2026 14:02
bin/push-content-to-staging
#!/usr/bin/env bash
# Push local content to staging. Defaults to dry run.
#
# Usage:
# bin/push-content-to-staging — dry run
# bin/push-content-to-staging --real — execute
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
@maxfenton
maxfenton / backstop
Created May 7, 2026 14:01
bin/backstop
#!/usr/bin/env bash
# Wrapper around the global `backstop` CLI.
#
# Usage:
# bin/backstop reference # capture from production (default)
# bin/backstop test --env=local # test against local DDEV site
# bin/backstop reference --env=staging
# bin/backstop approve
#
# --env=<local|staging|production> Sets BACKSTOP_ENV, read by backstop.cjs to pick baseUrl.
@maxfenton
maxfenton / branchname.yml
Created October 1, 2025 15:19
Github Actions workflow for deploying a Kirby site to shared hosting with rsync
name: Staging Deployment
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
@maxfenton
maxfenton / postcss.config.js
Created May 1, 2023 19:15
PostCSS config for a legacy SASS project
module.exports = {
parser: "postcss-scss",
plugins: [
require("postcss-easy-import")({ // Enables globs in @import. See style.css.
prefix: false,
skipDuplicates: false,
warnOnEmpty: false,
}),
require("postcss-advanced-variables"), // Sass-style @ vars, looping, and @import
require("postcss-custom-media"), // Custom reusable media queries
@maxfenton
maxfenton / Twig - Craft.xml
Last active May 1, 2023 15:50
PhpStorm live template for CraftCMS / Twig development
<templateSet group="Twig - Craft">
<template name="tag" value="{% tag '$END$' with {} %}&#10;&#9;&#10;{% endtag %}" description="{% tag %}...{% endtag %}" toReformat="false" toShortenFQNames="true">
<context>
<option name="Twig" value="true" />
</context>
</template>
</templateSet>
@maxfenton
maxfenton / uses.md
Last active November 8, 2024 16:46
Uses

/uses

a document about the tools I use to do my work as a web developer

Software

First of all

title type
oh-my-zsh terminal flavor
@maxfenton
maxfenton / cloudSettings
Last active June 28, 2020 00:50
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-28T00:50:14.414Z","extensionVersion":"v3.4.3"}