Skip to content

Instantly share code, notes, and snippets.

Coding things

Brett Jankord bjankord

Coding things
Block or report user

Report or block bjankord

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bjankord / viewed-all-files script
Created Jul 30, 2019
Viewed All Files script
View viewed-all-files script
// Checkes all "Viewed" checkboxes
var x = document.querySelectorAll('.js-reviewed-checkbox'), i = 0;
for (i = 0; i < x.length; i++) {
bjankord / find-and-replace-script.js
Last active Jul 12, 2019
Changelog find and replace script
View find-and-replace-script.js
#!/usr/bin/env node
/* eslint-disable no-console */
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const fs = require('fs');
const path = require('path');
const packagePaths = require('../peer-dependency-generator/getPackagePaths');
const findAndReplace = require('../peer-dependency-generator/findAndReplace');
// Generate the markdown to display peerDependencies information for each package
packagePaths.forEach((packagePath) => {
View toggle.js
var nav = document.querySelector('.nav__toggle');
var toggleState = function (elem, one, two) {
var elem = document.querySelector(elem);
elem.setAttribute('data-state', elem.getAttribute('data-state') === one ? two : one);
nav.onclick = function (e) {
toggleState('.nav ul', 'closed', 'open');
View datepicker-popup.jsx
{calendar && <Popup
contentAttachment={'top center'}
isOpen={( && !this.props.disabled)}
targetAttachment={'bottom center'}
targetRef={() => this.datePickerContainer}
View icons.csv
add src/icons/0001_plus_a.svg themeable
search src/icons/0002_magnifyingGlass_a.svg themeable
commit src/icons/0003_check_a.svg themeable
reload src/icons/0152_circleArrow_a.svg themeable deprecated
checkmark src/icons/0003_check_a.svg themeable
success src/icons/0003_check_i_heavyCircleGreen.svg
success_low_light src/icons/LL_0003_check_i_heavyCircleGreen.svg
success_inverse src/icons/0003_check_i_heavyCircleWhite.svg
success_inverse_low_light src/icons/LL_0003_check_i_heavyCircleWhite.svg
available src/icons/0003_check_i_heavyCircleGreen.svg
bjankord /
Created Mar 26, 2019
terra-base terra-i18n major version bump

terra-core|update-base-and-i18n-packages ⇒ lerna updated lerna info version 2.11.0 lerna info versioning independent lerna info ignore [ '', 'terra-i18n-plugin', '*.tgz' ] lerna info Checking for updated packages... lerna info Comparing with terra-responsive-element@4.5.0. lerna info Checking for prereleased packages... lerna info result

  • terra-base
  • terra-i18n
View updates.diff
@ packages/terra-form-select/src/_Frame.jsx:207 @ class Frame extends React.Component {
className: cx('search-input', { 'is-hidden': Util.shouldHideSearch(this.props, this.state) }),
+ const selected = 'selected!';
switch (variant) {
case Variants.TAG:
case Variants.MULTIPLE:
@ packages/terra-form-select/src/_Frame.jsx:224 @ class Frame extends React.Component {
bjankord / index.js
Created Jan 14, 2019
axe-core + puppeteer set up
View index.js
const util = require('util');
const puppeteer = require('puppeteer');
const axe = require('axe-core');
const urls = [
const results = [];
bjankord / memoized-custom-properties-check.js
Created Dec 26, 2018
View memoized-custom-properties-check.js
/* Didn't notice any perf improvement with memozing this, actually saw a regression
memoized custom property check, may see improvement if called more frequently */
const customPropertyCheck = () => {
let cache = {};
return () => {
if ('customProperties' in cache) {
console.log('Fetching from cache');
return cache['customProperties'];

react-dates uses an aria-describedby on the input attribute that points to a p element with the following content within it. "Press the down arrow key to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates."

  • Focusing on the input reads, "Date, edit text" followed by the aria-describedby content.
  • Pressing ? key opens a modal with the following keyboard shortcuts:

Keyboard Shortcuts

  • ↵ Select the date in focus.
  • ←/→ Move backward (left) and forward (right) by one day.
You can’t perform that action at this time.