Skip to content

Instantly share code, notes, and snippets.

View cromwellryan's full-sized avatar

Ryan Cromwell cromwellryan

View GitHub Profile
# Generate an audit report of High & Critical advisories
yarn audit --json --level high > audit.lines
# Transform from JSON-lines to JSON format
jq -s '.' audit.lines > audit.json
# Extract advisories
jq -r '.[] |
select(.type == "auditAdvisory") |
{ severity: .data.advisory.severity, path: .data.resolution.path, cves: (.data.advisory.cves | @csv), module_name: .data.advisory.module_name } |

The only evidence of kryptonite I see is the use of strictEqual. This might appear to work because of the term 'strict', but that only refers to type coercion (15 !== '15'). Since our left and right are both complex structures, I suspect the writer was intending to do a deep object comparison.

#!/bin/sh
# -*- coding: utf-8 -*-
# <bitbar.title>Wifi</bitbar.title>
# <bitbar.version>v1.o</bitbar.version>
# <bitbar.author>Ryan Cromwell</bitbar.author>
# <bitbar.author.github>cromwellryan</bitbar.author.github>
# <bitbar.image></bitbar.image>
# <bitbar.desc>Wifi Signal Strength</bitbar.desc>
# <bitbar.dependencies></dependencies>
#
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class extends Component {
@tracked
startDate
@tracked
endDate
@cromwellryan
cromwellryan / components.usage-daterange-selector\.js
Created September 30, 2020 16:49
Octane Date Range Component
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class extends Component {
@tracked
startDate;
endDate;
@cromwellryan
cromwellryan / components.podcast\.js
Last active August 31, 2020 20:35
Actions send arguments up
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class extends Component {
@tracked title = '';
@action
subscribe() {
// Do some work here to get chart data like the date they clicked
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
// set up the 'dadStatus' feed
AdafruitIO_Feed *dadStatus = io.feed("dad-status");
/* LED Friendly names */
const int inMeetingLed = 15;
const int headphonesOnLed = 14;
void clear() {
digitalWrite(inMeetingLed, LOW);
digitalWrite(headphonesOnLed, LOW);
@cromwellryan
cromwellryan / readme.md
Last active October 25, 2019 15:32
Task Forces are the model used by Sparkbox to sustain and elevate important, cross-cutting capabilities at Sparkbox. The mission of each task force is to improve, advocate for, clarify, and evolve aspects of our development capabilities through training, tooling, documentation, discovery, thought leadership, and mentoring.

Each task force has a mission that guides their planning, decision making, and efforts.

Accessibility Task Force

The Web Accessibility Taskforce develops resources to prepare our team to implement accessibility not as an à la carte feature but as an important consideration in our workflow.

Apprentice Roundtable

Producing advanced beginners who are ready to contribute on real, team web projects.

Build and Tooling Task Force

Improve Sparkbox project setup, builds, and tooling.

var assert = require('assert');
function failHard() {
return new Promise((resolve, reject) => {
reject('Failed promise!');
});
}
async function failHardAsync() {
throw new Error('Crap!');