Skip to content

Instantly share code, notes, and snippets.

View cstumph's full-sized avatar

Christopher Stumph cstumph

View GitHub Profile
----------------------------------------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------------------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------
All files | 39.82 | 19.24 | 20.25 | 40.9 |
eaze.com | 33.33 | 0 | 0 | 33.33 |
store.js | 33.33 | 0 | 0 | 33.33 | 49,50,57,101-103,107-109,112
eaze.com/components/address | 18.69 | 0 | 0 | 18.87 |
const fs = require('fs')
const text = fs.readFileSync('./lint errors').toString()
const txtArray = text.split('*')
function renderUniques (array) {
const set = new Set(array)
console.log(set)
return Array.from(set)
}
@cstumph
cstumph / count-event-listeners.js
Last active February 6, 2020 20:53
Count all event listeners
Array.from(document.querySelectorAll('*'))
.reduce(function(pre, dom){
var evtObj = getEventListeners(dom)
Object.keys(evtObj).forEach(function (evt) {
if (typeof pre[evt] === 'undefined') {
pre[evt] = 0
}
pre[evt] += evtObj[evt].length
})
return pre

We're the Support department of the largest JavaScript registry in the world. Together we support over one million users of the registry, CLI, Orgs, and Enterprise products. We embody the heart of "npm <3 you" and have helped build the loyalty and commitment of our global user base for years. In the past month, actions and inactions by current management have led to a 20% decline in npm staff. This trend shows no sign of slowing following a continued lack of transparency into the financial health of the company, the deletion of the employee handbook, the lack of cost-of-living raises, and the lack of accountability in the treatment of remaining staff.

We respectfully demand the following be reinstated or honored:

  • Any employee asked to work outside of normal business hours in their chosen time zone must give uncoerced consent.
  • Any employee required to work a company holiday or National Holiday for their country of residence must be given time and a half pay. - Any employee required to work hours or shift
@cstumph
cstumph / index.js
Last active August 29, 2015 14:24 — forked from max-mapper/index.js
requirebin sketch
var inherits = require('inherits');
var Game = require('crtrdg-gameloop');
var Entity = require('crtrdg-entity');
var Keyboard = require('crtrdg-keyboard');
inherits(Player, Entity);
function Player(options){
this.position = {
x: options.position.x,
@cstumph
cstumph / gawp.js
Created July 8, 2012 12:24
get ordered list of wishlist prices off of adafruit
//get ordered list of wishlist prices off of adafruit
var x = $('#cartContentsDisplay tr td:nth-child(4) b').text().split('$').sort(function(a,b){return b-a})
function(a,b){return b-a}
x.each(console.log(this))
@cstumph
cstumph / alphanum.html
Created December 22, 2011 09:26
Alphanumeric keycode array, plus some code to generate
<!-- All alpha numerics + punctuation
[192, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 189, 187, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 219, 221, 220, 65, 83, 68, 70, 71, 72, 74, 75, 76, 186, 222, 90, 88, 67, 86, 66, 78, 77, 188, 190, 191, 91]
-->
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>