Skip to content

Instantly share code, notes, and snippets.

const b = new Blinken({title: "Some title", author: "Me"});
b.run(initializer);
@jhalderm
jhalderm / example.js
Last active April 27, 2020 16:50 — forked from ewust/gist:7957243
function initializer(lights) {
// Set the strand to full brightness
for (let i=0; i<100; i++) {
lights[i].a = 1;
}
// Return our update function
return update;
}
@jhalderm
jhalderm / example.js
Last active April 27, 2020 16:52 — forked from ewust/gist:7957194
// global variable that keeps track of if we are red (true) or green (false)
let strandRed = true;
function update(lights) {
// Loop over all the lights
for (let i=0; i<100; i++) {
if (strandRed) {
// Set red
lights[i].rgb(1, 0, 0);
@jhalderm
jhalderm / example.js
Last active April 27, 2020 16:48 — forked from ewust/gist:7957372
(new Blinken({
title: "Some title",
author: "Me",
})).run( (lights) => {
// variable that tracks if we are red (true) or green (false)
let strandRed = true;
// Set the strand to full brightness
for (let i=0; i<100; i++) {
lights[i].a = 1;
<meta name="description" content="Blinkenlights" />
<html>
<head>
<script src="https://blinken.org/client.js"></script>
</head>
<body></body>
</html>
@jhalderm
jhalderm / gist:8853b35ed139fc6b9493bda5718bd306
Created March 23, 2019 00:28
Blinkenlights Red Snake Example
name: Snake Example
description: Blinkenlights Red Snake Example
resources:
- https://gist.githubusercontent.com/ewust/7957194/raw/e13ed54905eb4b9c57a73c85a60b84b1372ba656/gistfile1.js
normalize_css: no
wrap: b
panel_js: 1
panel_css: 0

Keybase proof

I hereby claim:

  • I am jhalderm on github.
  • I am ah (https://keybase.io/ah) on keybase.
  • I have a public key whose fingerprint is 3AA6 47A0 94D8 F75A 2861 0198 5AE6 759B 80FB 6D67

To claim this, I am signing this object: