Skip to content

Instantly share code, notes, and snippets.

View AverageMarcus's full-sized avatar
👋
¯\_(ツ)_/¯

Marcus Noble AverageMarcus

👋
¯\_(ツ)_/¯
View GitHub Profile
@lordneon
lordneon / steps.md
Last active April 26, 2024 09:58
UK Light Wiring with Shelly 1

Intro

This is a simple guide on how to automate UK lights with a Shelly 1 by installing the shelly 1 relay into the ceiling pendant which has both permanent live, neutral and a switched live back from the wall switch.

These steps are from my own experience making my lighting "smart" but also user friendly (it works via a wall switch!). This simple guide will go through replacing an a normal ceiling pendant with one with room for a Shelly 1. If you have a ceiling light with a bigger base it's even easier.

Warning Electrical regulations must be followed by law. If you are not a competent person under the regulations do not attempt electrical work. https://www.diydoctor.org.uk/projects/electrical_safety.htm

Wiring Diagram

This diagram has been taken from here and modified to include the Shelly 1. Wiring Diagram

@TakayoshiKochi
TakayoshiKochi / Custom-Elements-in-Imports.md
Last active September 3, 2019 13:58
CEv1 in classic HTML Imports

Custom Elements V1 in HTML Imports

This document describes how custom elements v1 work when they are defined or used in HTML Imports.

HTML Imports is currently implemented only in Chrome, and this document provides non-normative information about Chrome's implementation in M54 and later, for the reference of future works that tries to achieve similar functionality like HTML Imports.

Defining Custom Element in an imported document

As the global context window is shared with script running in an imported document, you can access the custom elements registry via window.customElements. This is straightforward and no different from the usage in a usual HTML document.

@bendc
bendc / supportsES6.js
Created August 25, 2016 08:05
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
@s10wen
s10wen / gist:73afbfa5971ba966307a
Last active August 24, 2016 08:25
UpFrontConf 2015 - Slides
Brad Frost:
TBC
Alicia Sedlock:
https://speakerdeck.com/aliciasedlock/jumping-into-front-end-testing
Richard Rutter:
http://webtypography.net/talks/upfront2015/
Soledad Penadés: