Skip to content

Instantly share code, notes, and snippets.

add_newline = false
[character]
error_symbol = "[x](bold red)"
success_symbol = "[>](bold green)"
vicmd_symbol = "[<](bold green)"
[directory]
disabled = false
read_only = " ro"

User story

As a I want So that

Acceptance criteria

ID Given When Then
DOCKER_BUILDKIT=1 docker image build -f markdownlint.Dockerfile -t markdownlint .
docker run --rm \
-v $(pwd)/.markdownlint.yaml:/root/.markdownlint.yaml \
-v $(pwd)/source:/data \
markdownlint
FROM php:8-cli-alpine AS base
FROM base AS console
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
ENTRYPOINT ["/bin/sh"]
RUN apk add --no-cache \
git \
libpng-dev \
&& docker-php-ext-install \
FROM php:7.4-fpm-alpine AS base
ENV PATH=$PATH:/app/vendor/bin
WORKDIR /app
RUN apk add --no-cache \
libpng-dev \
mariadb-client \
&& docker-php-ext-install \
bcmath \
gd \
pdo_mysql
name: CI
on:
pull_request:
branches:
- production
push:
branches:
- production
workflow_dispatch:
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
<script src="https://unpkg.com/petite-vue" defer init></script>
<div class="p-10">
<div class="max-w-4xl mx-auto p-4 bg-gray-100" v-scope="{
facilities: [
{ name: 'Toilets', available: false },
{ name: 'Parking', available: true },
{ name: 'ATM', available: false },
{ name: 'Ticket office', available: false },
@opdavies
opdavies / docker.md
Last active April 5, 2021 17:27
Docker resources

Books and video courses

YouTube videos

@opdavies
opdavies / Node.php
Last active May 11, 2020 16:20
Automatically updating the created date for talk nodes, to match the date of the latest event for that talk.
<?php
declare(strict_types=1);
namespace Drupal\custom\Entity;
use Drupal\node\Entity\Node as CoreNode;
use Drupal\paragraphs\ParagraphInterface;
use Illuminate\Support\Collection;
<?php
use Symfony\Component\Finder\Finder;
require_once __DIR__.'/vendor/autoload.php';
$finder = new Finder();
$files = $finder->in(__DIR__.'/source/_posts')->files();
/** @var \Symfony\Component\Finder\SplFileInfo $file */