Skip to content

Instantly share code, notes, and snippets.

View nicksteffens's full-sized avatar

Nick Steffens nicksteffens

View GitHub Profile
@nicksteffens
nicksteffens / components.image-gallery.js
Created April 12, 2018 21:31
Masonry Attempt via CSS & Sort Order
@nicksteffens
nicksteffens / Modals.md
Last active July 16, 2018 15:48
Proposed modal behavior / use case

Modals

What is a modal?

  • Putting the application into a new mode, without losing context of where you currently are (UI, URL, data loaded, etc)

What is a dialog?

  • alert see below

What is a modal-dialog?

  • A dialog inside a modal.
@nicksteffens
nicksteffens / Operator Mono Customization.less
Created October 22, 2018 15:31
Adding some custom styling for Operator Mono Atom Theme
atom-text-editor.editor {
/*
Transform selected text into alternative font for elegant touch:
- this
- HTML and JSX attributes
- JS functions (except arrow function)
- JS undefined
- JS storage (const/let/async)
- EX constants
- Ruby (nil/self/block)
@nicksteffens
nicksteffens / backspace-triggerkeyevent-test.js
Created April 17, 2019 20:00
Example of the triggerKeyEvent being actively blocked by the browser.
import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, typeIn, triggerKeyEvent } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
module(
"Integration | Component | data-properties-panel/custom-property-form",
function(hooks) {
setupRenderingTest(hooks);
@nicksteffens
nicksteffens / slow-tests.js
Last active March 6, 2020 21:48
Simple DOM query to use with Qunit results to find slow tests
let slowTests = [];
const testElements = document.querySelectorAll('li[id].pass');
const tolerance = 1500;
testElements.forEach(test => {
const moduleName = test.getElementsByClassName('module-name')[0].textContent
const testName = test.getElementsByClassName('test-name')[0].textContent
const testDurationString = test.getElementsByClassName('runtime')[0].textContent
const testDuration = parseInt(testDurationString.slice(0, -3))
@nicksteffens
nicksteffens / depod.sh
Last active February 10, 2020 21:31
Script to move pod structure to classic
#!/bin/bash
echo "Updating Template Path Reference..."
sed -ie "s+./template+../templates/components/$1+g" "addon/components/${1}/component.js"
rm addon/components/"${1}"/component.jse
echo "Migrating component $1 back to classic structure..."
git mv "addon/components/${1}/component.js" "addon/components/${1}.js"
git mv "addon/components/${1}/template.hbs" "addon/templates/components/${1}.hbs"
let failingTests = [];
const testElements = document.querySelectorAll('li[id].fail');
testElements.forEach(test => {
const moduleName = test.getElementsByClassName('module-name')[0].textContent
const testName = test.getElementsByClassName('test-name')[0].textContent
failingTests.push(`- [ ] ${moduleName} ${testName}`)
});
console.log(failingTests.join('\n'));
// Typescript Generics
class MyMap<T extends Error> {
value: T;
getVal() {
return this.value;
}
constructor(val: T) {
  • Navigate to https://vax4nyc.nyc.gov/patient/s/vaccination-schedule
  • Fill out the "Eligibility" form
    1. Check " New York City residents ages 30 or older"
    2. "No" you're not NYC employee
    3. Fill in DoB
    4. Fill in Zip
    5. "yes" Certify live in NYC
    6. click Next
  • Fill in "Health Screening And attestation
    1. "no" for allergic reaction
import Component from '@glimmer/component';
export default class extends Component {
}