Skip to content

Instantly share code, notes, and snippets.

pureLit("dispatch-todo", (element) => {
const { publish, getState } = useState(element, { todos: [] } as TodoState);
return html`
<h2>Your todos</h2>
<todo-add
@add="${(e: CustomEvent) =>
publish({ todos: [...getState().todos, e.detail] })}"
></todo-add>
<todo-list
.items="${getState().todos}"
@customElement("demo-element")
export class DemoElement extends LitElement {
state: DispatcherType<DemoElementState>;
constructor() {
super()
// register dispatcher in the constructor
this.state = useDispatcher<DemoElementState>(this, { actions: [] })
}
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 4
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.setBrightness(20);
const unsigned char LED_RED = 3;
const unsigned char LED_GREEN = 5;
const unsigned char LED_BLUE = 6;
void setup() {
Serial.begin(9600);
pinMode(LED_GREEN, OUTPUT);
pinMode(LED_BLUE, OUTPUT);
pinMode(LED_RED, OUTPUT);
}
// ==UserScript==
// @name GSlack
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Using the css from https://github.com/paveyry/Slack-Theme-for-Hangouts-Chat/
// @author You
// @match https://chat.google.com/*
// @grant none
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am matthiaskainer on github.
  • I am matthias_kainer (https://keybase.io/matthias_kainer) on keybase.
  • I have a public key ASAZ47c1zOdTW7ilmSrksXxnL-jFRtZW6JlRi3Vh0WHm5Ao

To claim this, I am signing this object: