Skip to content

Instantly share code, notes, and snippets.

View aduth's full-sized avatar

Andrew Duthie aduth

View GitHub Profile
@aduth
aduth / input.scss
Created December 13, 2022 15:52
Generated by SassMeister.com.
// USWDS:
%block-input-styles {
margin-top: 0.5rem;
}
// ...
// LGDS:
%block-input-styles {
margin-top: 0.25rem;
@aduth
aduth / input.scss
Created May 13, 2022 14:51
Generated by SassMeister.com.
.usa-radio__input--tile:disabled + .usa-radio__label--illustrated,
.usa-checkbox__input--tile:disabled + .usa-checkbox__label--illustrated {
.usa-radio__image,
.usa-checkbox__image {
filter: invert(45%) sepia(1%) saturate(0%) hue-rotate(232deg) brightness(100%) contrast(80%);
}
}
.usa-radio__input--tile:disabled + .usa-radio__label--illustrated .usa-radio__image,
.usa-checkbox__input--tile:disabled + .usa-checkbox__label--illustrated .usa-checkbox__image {
@aduth
aduth / flag.svg
Last active July 14, 2021 15:04
US Flag
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aduth
aduth / babel.config.js
Created August 8, 2020 18:28
Alternative Node Main Entrypoint with Babel (babel-plugin-module-resolver)
const { join } = require('path');
module.exports = {
plugins: [
[
'module-resolver',
{
root: ['./packages'],
alias: {
'^@my-scope\\/([^/]+)$': (match) => {
@aduth
aduth / index.js
Last active March 14, 2020 19:34
Snowpack Strict + "type: module" incompatibility
import log from './log.js';
log();
@aduth
aduth / gitrebasebranch.sh
Created February 11, 2020 17:05
Git - Interactive rebase against own merge base
#!/bin/bash
git rebase -i $(git merge-base HEAD master)
const { get } = require( 'https' );
const { parse } = require( 'url' );
const pulls = [
'https://github.com/WordPress/gutenberg/pull/14003',
'https://github.com/WordPress/gutenberg/pull/14469',
'https://github.com/WordPress/gutenberg/pull/14475',
'https://github.com/WordPress/gutenberg/pull/14681',
'https://github.com/WordPress/gutenberg/pull/14693',
'https://github.com/WordPress/gutenberg/pull/14711',
@aduth
aduth / get-merge-commits.js
Created April 15, 2019 14:46
Generate cherry-pick commands from a set of pull requests
const { get } = require( 'https' );
const { parse } = require( 'url' );
const pulls = [
'https://github.com/WordPress/gutenberg/pull/14003',
'https://github.com/WordPress/gutenberg/pull/14469',
'https://github.com/WordPress/gutenberg/pull/14475',
'https://github.com/WordPress/gutenberg/pull/14681',
'https://github.com/WordPress/gutenberg/pull/14693',
'https://github.com/WordPress/gutenberg/pull/14711',
registerBlockType( 'core/colorable', {
abstract: true,
attributes: {
color: {
type: 'string',
},
},
edit: () => (
@aduth
aduth / index.html
Created December 30, 2018 21:19
Pop vs. Splice negative (http://jsbench.github.io/#d4e1fe19291d325ae4fdc4e8cc609d1b) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Pop vs. Splice negative</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>