Skip to content

Instantly share code, notes, and snippets.

View GarthDB's full-sized avatar
πŸ•ΈοΈ
never updating status

Garth Braithwaite GarthDB

πŸ•ΈοΈ
never updating status
View GitHub Profile
@GarthDB
GarthDB / css.md
Last active April 20, 2023 20:06
This is a collection of icons used in the docs for the Spectrum CSS project.
Arguments:
/Users/garthdb/.asdf/installs/nodejs/14.19.3/bin/node /Users/garthdb/.yarn/bin/yarn.js --frozen-lockfile
PATH:
/Users/garthdb/.asdf/plugins/nodejs/shims:/Users/garthdb/.asdf/installs/nodejs/14.19.3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/garthdb/.yarn/bin:/Users/garthdb/.config/yarn/global/node_modules/.bin:/Users/garthdb/.asdf/shims:/usr/local/Cellar/asdf/0.10.2/libexec/bin:./bin:/usr/local/bin:/usr/local/sbin:/Users/garthdb/.dotfiles/bin:/Users/garthdb/.rbenv/shims:/usr/local/git/bin:/Applications/Postgres93.app/Contents/MacOS/bin:/Users/garthdb/Code/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/garthdb/.rvm/bin:/Users/garthdb/.rvm/bin
Yarn version:
1.22.19
Node version:
~/Spectrum/spectrum-css vrt-reference 6m 42s
❯ npm run backstop:docker:test
> [email protected] backstop:docker:test /Users/garthdb/Spectrum/spectrum-css
> backstop test --docker --config=backstop_data/backstop_test.js --env=local
BackstopJS v5.0.4
Loading config: /Users/garthdb/Spectrum/spectrum-css/backstop_data/backstop_test.js
COMMAND | Executing core for "test"
@GarthDB
GarthDB / rework-script.js
Last active September 18, 2019 22:45
Rework Metadata
const path = require('path');
const fs = require('fs');
const yaml = require('js-yaml');
const order = [
'id',
'name',
'dnaStatus',
'status',
'ignoreDNA',
# Run npm install --dev [email protected] to resolve 3 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High β”‚ Regular Expression Denial of Service β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package β”‚ minimatch β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ mocha [dev] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path β”‚ mocha > glob > minimatch β”‚
import test from 'ava';
class Basic {
constructor(str) {
this.str = str;
}
}
test('should match object and typed object', t => {
const basic = new Basic('tada');
@GarthDB
GarthDB / button.jsx
Created February 2, 2017 17:11
JS Framework CSS example
import React from 'react';
import Filler from 'filler';
const cssClassName = Filler.className('topcoat-button');
export default class Button extends React.Component {
render() {
return <button className={cssClassName}>Button</button>;
}
}
@GarthDB
GarthDB / regexs.yml
Created October 28, 2016 18:36
Helpful Atom RegExs
all:
- regex: "((?:\w|-)*)":\s?\S*\n?
replace: "$1 "
description: list of npm dependencies from package json into npm install command
@GarthDB
GarthDB / filters.css
Created May 25, 2016 15:46
Styling filters on Redux example todo app
.filters {
background: #2c3e50;
height: 80px;
box-sizing: border-box;
color: #ecf0f1;
box-shadow: 0 0 2px 1px rgba(0,0,0,0.2);
padding: 32px 35px 0;
width: calc(100% + 20px);
font-weight: 700;
border: 0;

.filters

When styling an app it is best if we start with semantic, uncluttered markup.

This isn't just an idealistic approach, it has real tangible benefits:

  • The code is descriptive which makes it easier to maintain
  • It also makes it easier to predict how browser or user stylesheets might interact
  • Often times it makes it easier to style
  • If for some reason the stylesheet fails to load, things still make sense