Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kenneth Rohde Christiansen kenchris

🏠
Working from home
  • Intel Corporation
  • Denmark
View GitHub Profile
View .html
<html>
<script type="module">
import { html, render } from '/lit-html.js';
class MyGreater extends HTMLElement {
static get observedAttributes() { return ['data-name']; }
constructor() {
super();
this.attachShadow({mode: 'open'});
View WICG-Shortcuts-EXPLAINER.md

Shortcuts API Specification

This explainer is for the Shortcut API

Introduction

Some platforms like Windows and Android have ways to add menu items to the app launcher icon itself, here after called shortcuts. These can perform certain app actions. On Android in addition, you can drag these shortcuts to the homescreen.

View gist:7f815230270db73e1bc3d7620721e629
function parseColor(colorStr) {
if (!this.div) {
this.div = document.createElement('div');
this.div.style.hidden = true;
document.body.appendChild(this.div)
}
this.div.style.color = colorStr;
if (this.div.style.color === "")
this.div.style.color = `#${colorStr}`;
View gist:ef26b8223654e181ef9e403e3b21f7e1
function parseColor(colorStr) {
if (!this.div) {
this.div = document.createElement('div');
this.div.style.hidden = true;
document.body.appendChild(this.div)
}
this.div.style.color = colorStr;
if (this.div.style.color === "")
View gist:610e335c8045ed25fe90036920cad803
Connecting...
(index):101 Sending to serial: [set transfer ihex
]
(index):114 Reply: [HEX]
set transfer ihex
[BCMD]
ihex
[ECMD]
View gist:24744a7e469cb981aed957a26c338394
Sending to serial: [set transfer ihex
]
(index):114 Reply: � � Zephyr.js DEV MODE Nov 7 2016 11:01:12
'A Shell' bash
Commands list:
acm> set transfer ihex
ihex
View gist:f6fbf7b9ebf4831fef08a8f1b84a8d14
Sending to serial: [set transfer ihex
]
(index):114 Reply: � � Zephyr.js DEV MODE Nov 7 2016 11:01:12
'A Shell' bash
Commands list:
acm> set transfer ihex
ihex
View gist:a5a089a9331fb168339cd91d8ba4d877
Sending to serial: [set transfer ihex
]
(index):112 reply: s
(index):112 reply: e
(index):112 reply: t
(index):112 reply:
(index):112 reply: t
(index):112 reply: r
(index):112 reply: a
View gist:d5899c11c0f0f3497b93d86644c77e9b
Sending to serial: [set transfer ihex
]
(index):109 [HEX]
(index):109 s
(index):109 e
(index):109 t
(index):109
(index):109 t
View gist:fc4c07a110ae3dfae444374f66cd2028
Sending to serial: [set transfer ihex
]
(index):107 � 
(index):101 Sending to serial: [stop
]
(index):107 � 
(index):101 Sending to serial: [load
]