Skip to content

Instantly share code, notes, and snippets.

View emarref's full-sized avatar
Verified

Malcolm Fell emarref

Verified
View GitHub Profile
@emarref
emarref / README.md
Created May 13, 2026 22:43 — forked from leonjza/README.md
extract a 1password 1pux exported organisation into separate vault exports

1Password 8 .1pux Vault Extrator

Looks like 1Password 8 only allows you to export whole organsations with all the vaults you have access to. Exporting to .1pux format means you can use this script to separate vaults into their own exports.

use

./separate.sh 1password_export.1pux
@emarref
emarref / diagram.md
Last active January 13, 2026 20:47
Mermaid diagram example

Mermaid Diagram Example

This is a normal markdown document with a diagram embedded in it. The diagram is using Mermaid.

sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
 loop HealthCheck
# Pin Mappings for Stock 2023 Creality Ender 3 V3 SE
#
# To use this configuration:
# 1. During "make menuconfig", select:
# - STM32F103 with a "28KiB bootloader"
# - Serial communication on USART1 (PA10/PA9)
#
# 2. For a direct serial connection:
# - In "make menuconfig", select:
# - "Enable extra low-level configuration options"

This helps to prevent PR spam, and avoids breaking changes in Typescript.

  • All major version updates get their own PRs
  • All security updates get their own PRs
  • TypeScript should always have its own PR, even for patch and minor versions (it doesn't follow SemVer)
  • Everything else (i.e. patch and minor version updates) should be grouped into a single PR to reduce PR spam
@emarref
emarref / labeler.yml
Created May 25, 2023 01:47
Nice releases
# .github/labeler.yml
# Match changes to files to apply a label
"@backend":
- apps/backend/**/*
"@frontend":
- apps/frontend/**/*
"@api":
- packages/api/**/*
"@infrastructure":
- terraform/**/*
@emarref
emarref / docker-compose.yaml
Created October 27, 2021 02:45
Home Assistant
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/raspberrypi4-homeassistant:stable"
volumes:
- $PWD/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
@emarref
emarref / WorkerSubscriber.php
Last active January 10, 2021 21:32
Deliver failed Symfony messenger messages to Sentry
<?php declare(strict_types=1);
namespace App\Subscriber;
use Sentry\FlushableClientInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent;
use Symfony\Component\Messenger\Exception\HandlerFailedException;
class WorkerSubscriber implements EventSubscriberInterface
@emarref
emarref / anz-transactions.js
Last active December 24, 2019 01:20
Download ANZ credit card transactions into YNAB format
javascript:(() => {
const table = document.querySelector('.transactions-list');
if (null === table) {
alert('Could not find transactions table');
return;
}
const transactions = Array.from(table.querySelectorAll('.transaction-row'))
.filter(row => row.querySelector('.column-dr span') ? true : false)
.map(row => [
new Date(row.querySelector('.column-trandate').innerText).toLocaleDateString(),
@emarref
emarref / utc2nz
Created October 19, 2019 06:32
Shell script to convert a timestamp to NZ time
#!/usr/bin/env php
<?php
$originTimeZone = 'UTC';
$targetTimeZone = 'Pacific/Auckland';
////////////////////////
$timestamp = implode(' ', array_slice($_SERVER['argv'], 1));
$origin = new DateTimeZone($originTimeZone);
@emarref
emarref / DummyComponent.tsx
Created January 17, 2019 20:36
A dummy component to hilight IDE autocompletion
import React from 'react';
import { connect } from 'react-redux';
interface RootState {
dataFromRootState: string;
}
interface OwnProps {
manualOwnProp: string;
}