Skip to content

Instantly share code, notes, and snippets.

View greatislander's full-sized avatar

Ned Zimmerman greatislander

View GitHub Profile
<?php
Project::seekingGroups([
['App\Models\DisabilityType' => 1],
['App\Models\GenderIdentity' => 3],
]);
foreach($seekingGroups as $criteriable => $id) {
Criterion::where([
.rtl-column-1 tr td:nth-of-type(1) {
text-align: right !important;
}
.rtl-column-2 tr td:nth-of-type(2) {
text-align: right !important;
}
.rtl-column-3 tr td:nth-of-type(3) {
text-align: right !important;
@greatislander
greatislander / disable-cdp-widget.html
Created May 25, 2021 16:36
Netlify Snippet to disable the Collaborative Deploy Preview widget
<style>[data-netlify-deploy-id]{display:none;}</style>
{
"lintspaces": {
"newlines": {
"excludes": [
"./src/activities/*.md",
"./src/events/*.md",
"./src/lesson-plans/*.md",
"./src/organizations/*.md",
"./src/products/*.md",
"./src/projects/*.md",
/*
.col--flex: a flexible width column
.tabs--left: left-oriented tabs
.grid__caption: the caption of an image in a grid
.widget__titlebar: the titlebar of a widget
.progress__label: the label for a progress bar
.reorderer__dropWarning: the drop warning used with the reorderer
.inlineEdit__textEditButton: the 'edit' button used with an inline edit
FAIL test/post.test.js
Single post
✕ Should pass Axe tests (514ms)
● Single post › Should pass Axe tests
Error
Error: expect(received).toPassAxeTests(expected)
Expected page to pass Axe accessibility tests.
@greatislander
greatislander / theme-testing.md
Last active December 14, 2018 15:30
Theme Testing
  • Proof of concept E2E testing using Jest + aXe (branch)
  • Proof of concept E2E testing using Jest + aXe in Docker (branch)
  • Create NPM package of test requirements
  • Improve formatting of reports from Jest + aXe
  • Different test commands for audit and pass/fail
  • Enable scaffolding basic E2E tests for themes (issue)
  • Enable running E2E tests locally via CLI (environment-agnostic)
  • Enable E2E tests for themes in CI (using Docker with sample content)
<table style="border-collapse: collapse; width: 100%; height: 3em;" border="1">
<tbody>
<tr style="height: 1.5em;">
<td style="width: 25%; height: 1.5em;">One</td>
<td style="width: 25%; height: 1.5em;">Two</td>
<td style="width: 25%; height: 1.5em;">Three</td>
<td style="width: 25%; height: 1.5em;">Four</td>
</tr>
<tr style="height: 1.5em;">
<td style="width: 25%; height: 1.5em;">One</td>
@greatislander
greatislander / network-storage.php
Created April 6, 2018 17:32
Network Storage Checker
<?php
function format_bytes( $bytes, $precision = 2 ) {
$units = [ 'B', 'KB', 'MB', 'GB', 'TB' ];
$bytes = max( $bytes, 0 );
$pow = floor( ( $bytes ? log( $bytes ) : 0 ) / log( 1024 ) );
$pow = min( $pow, count( $units ) - 1 );
$bytes /= ( 1 << ( 10 * $pow ) );
return round( $bytes, $precision ) . ' ' . $units[ $pow ];
}
@greatislander
greatislander / Contract Killer 3.md
Created March 14, 2018 20:09 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post