Skip to content

Instantly share code, notes, and snippets.

Avatar
🏁
Racing through work

Robert DeLuca Robdel12

🏁
Racing through work
View GitHub Profile
View clone-with-shadow-roots.js
/**
* cloneNode(true), but also clones shadow roots.
* @param {Element}
* @param {ShadowRoot[]} [shadowRoots] Any closed shadow roots passed here will be included.
*/
function cloneWithShadowRoots(node, shadowRoots) {
function walk(node, clone) {
let shadow = node.shadowRoot || shadowRoots.find(r => r.host === node);
if (shadow) {
clone.attachShadow({ mode: shadow.mode }).append(...[].map.call(shadow.childNodes, c => c.cloneNode(true)));
@dominictarr
dominictarr / readme.md
Created Nov 26, 2018
statement on event-stream compromise
View readme.md

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@oznu
oznu / index.js
Last active Dec 4, 2020
Homebridge Switch Plugin Example
View index.js
'use strict'
let Service, Characteristic
module.exports = (homebridge) => {
/* this is the starting point for the plugin where we register the accessory */
Service = homebridge.hap.Service
Characteristic = homebridge.hap.Characteristic
homebridge.registerAccessory('homebridge-switch-example', 'SwitchExample', SwitchAccessory)
}
@dschep
dschep / raspbian-python3.6.rst
Last active Oct 28, 2021 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian
View raspbian-python3.6.rst

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@cowboyd
cowboyd / dataset.js
Last active Aug 27, 2015
An API to put the fun back in rendering an asynchronous, paginated dataset in JavaScript!
View dataset.js
import Dataset from 'dataset';
import getStuff from 'get-stuff';
// Dataset.js is a JavaScript only object for navigating through paged
// data. It understands that rendering a paged dataset in realtime as
// it is incrementally and asynchronously loaded is no mean feat, and
// so it's got your back.
//
// It's goal is to give you as much information about what exactly is
// happening at any give moment so that you can represent it
View thoughts.md

I agree with Monteiro that folks who act reprehensibly should immediately be removed from our spaces. No question. However, I do—as someone who has struggled with mental illness my entire life—have some additional thoughts.

As much as I want—no NEED—to remove harmful individuals from spaces, I find it harmful using "sociopath" to describe bad behavior. I've personally used this word frequently, along with "crazy" and other ableist language. I want to do better.

Speaking with my friend who is a psychologist, she noted "sociopath" and "psychopath" are meaningless words; no agreed-upon definition. Calling someone a "sociopath" is like calling a woman a "slut"; you are labeling based on behavior you don't like or don't understand. Personally, I think it further stigmatizes mental health for people who've been diagnosed with personality disorders. Most of the people I know personally with personality/disaffective disorders are wonderful, caring people, and it's unfair and unclear for them to be lumped in with

@lukemelia
lukemelia / note.txt
Created Apr 8, 2015
When Error: watch EMFILE strikes (OS X)
View note.txt
This requires `brew install jq` which is a command json query.
I got this from @krisselden
@cowboyd
cowboyd / mutable-collection.js
Created Mar 26, 2015
Present a mutable interface to an immutable array and track changes in realtime
View mutable-collection.js
import Ember from 'ember';
/**
* Presents a mutable interface to an immutable array.
*
* As you make changes to the array, it tracks which objects are new,
* which objects have been removed, and which objects were in the
* original array. To use an instance of this class, set the
* `original` property to an array. This array will not be touched as
* you make changes via the mutable interface. E.g.
@gcollazo
gcollazo / emberaddons-data.md
Last active Aug 29, 2015
Data for emberaddons.com
View emberaddons-data.md
@jdjkelly
jdjkelly / gist:0bddf2e834b6d6bc2174
Last active Mar 8, 2019
Making Accessible Ember Components
View gist:0bddf2e834b6d6bc2174

Making Accessible Ember Components

Making the web accessible is important. We have ethical and, in some cases, legal obligations to ensuring access to all of users.

Luckily for us, it's easy to make an accessible Ember Component.

What are components?

To understand the accessibility story around Ember Components, we have to start by talking about Web Components. Ember Components are designed to be interoperable with the final Web Components API.