Skip to content

Instantly share code, notes, and snippets.

View NickHeiner's full-sized avatar
💭
Wubba lubba dub dub!!

Nick Heiner NickHeiner

💭
Wubba lubba dub dub!!
View GitHub Profile
import csv
import json
import re # Using regex to help clean keys
def clean_key(key):
"""Removes the prefix and cleans up the key name."""
# Remove prefix like '1. a_', '3. sxs_', etc.
cleaned = re.sub(r'^\d+\.\s*(?:[ab]_|sxs_)?', '', key)
# Clean specific known patterns like '(rating)' or ' (text)'
cleaned = cleaned.replace(' (rating)', '_rating')
export interface AccessibilityNode {
tag: string;
role: string;
name: string;
children: AccessibilityNode[];
}
/**
* Once AOM support is broadly available, we should use that instead of this.
*
const arr = [
{id: 'a', val: 0},
{id: 'b', val: 1},
{id: 'c', val: 1},
{id: 'd', val: 1},
{id: 'e', val: 1},
{id: 'f', val: 1},
{id: 'g', val: 1},
{id: 'h', val: 1},
{id: 'i', val: 1},
// Run with Node.js v9.11.1
const _ = require('lodash');
const partsOfIpAddr = 4;
const bitsPerIpPart = 8;
const numberBitLength = partsOfIpAddr * bitsPerIpPart;
const getValueFromFlippingTrailingZeros = countZeros => Math.pow(2, countZeros) - 1;
.-''-.
/ , \
.-'`(o) ;
'-==. |
`._...-;-.
)--""" `-.
/ . `-.
/ / `. `-.
yarn install v1.5.1
verbose 0.462 Checking for configuration file "/Users/nickheiner/Code/camelot-web/.npmrc".
verbose 0.462 Checking for configuration file "/Users/nickheiner/.npmrc".
verbose 0.462 Found configuration file "/Users/nickheiner/.npmrc".
verbose 0.463 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/Code/camelot-web/.npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/Code/.npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/.npmrc".
verbose 0.464 Found configuration file "/Users/nickheiner/.npmrc".
verbose 0.464 Checking for configuration file "/Users/.npmrc".
@NickHeiner
NickHeiner / npm-ls-std-err.txt
Created October 9, 2017 18:47
npm error report files
npm ERR! missing: prop-types@https://registry.npmjs.org/prop-types/-/prop-types-15.5.8.tgz, required by [email protected]
npm ERR! missing: babel-code-frame@https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz, required by [email protected]
npm ERR! missing: babel-messages@https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz, required by [email protected]
npm ERR! missing: babel-traverse@https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.24.1.tgz, required by [email protected]
npm ERR! missing: babel-types@https://registry.npmjs.org/babel-types/-/babel-types-6.24.1.tgz, required by [email protected]
npm ERR! missing: babylon@https://registry.npmjs.org/babylon/-/babylon-6.16.1.tgz, required by [email protected]
npm ERR! missing: convert-source-map@https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz, required by [email protected]
npm ERR! missing: debug@https://registry.npmjs.org/debug/-/debug-2.6.3.tgz, required by [email protected]
@NickHeiner
NickHeiner / npm-shrinkwrap.diff
Created October 5, 2017 16:39
npm shrinkwrap modification issues
diff --git a/client/npm-shrinkwrap.json b/client/npm-shrinkwrap.json
index 4f1d53183..4edf9a27d 100644
--- a/client/npm-shrinkwrap.json
+++ b/client/npm-shrinkwrap.json
@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "abab": {
+ "version": "1.0.4",
@NickHeiner
NickHeiner / accessibility.md
Created August 17, 2017 19:47
Accessibility Talk Snippets
<p>Commits</p>
<p>Commit 1</p>
<p>Commit 2</p>
<h3>Commits</h3>
<ol>
 Commit 1
@NickHeiner
NickHeiner / talks.md
Last active August 11, 2021 15:16
Talks