Skip to content

Instantly share code, notes, and snippets.

binji / LICENSE
Last active Jun 12, 2021 w/o macros
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
import paho.mqtt.client as mqtt
from sty import fg, bg, rs
width = height = 5
mqtt_server = ""
mqtt_topic = "matrixflut"
def on_connect(client, userdata, flags, rc):
print("Connected (rc={})".format(rc))
View Handwasher_timer.ino
#include <stdint.h>
#include <Arduino.h>
#include <FastLED.h>
#define DATA_PIN_LED 27
const int pushButton = 39;
static CRGB leds[25];
Kartoffel / M5_IR_MQTT.ino
Created Apr 11, 2020
M5 Atom MQTT to IR bridge for controlling Edifier speakers
View M5_IR_MQTT.ino
// Compile for ESP32 Pico Kit, upload rate 115200 baud
#include <Arduino.h>
#include <WiFi.h>
#include <PubSubClient.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
#define MQTT_SERVER ""
#define MQTT_TOPIC_DEBUG "niek/debug/"
#define MQTT_TOPIC_BASE "niek/speakers/"
View clock.ino
#include <stdint.h>
#include <Arduino.h>
#include <FastLED.h>
#define DATA_PIN_LED 27
static CRGB leds[25];
void setup(void)
charlieroberts /
Created Mar 21, 2020
Equinox Marching.js Tutorial


This demo tutorial will mainly focus on getting started using marching.js playground, a browser-based tool for live coding with ray marchers. I’ve added some extra information at the beginning on the demoscene, which was an important source of inspiration for marching.js. Here’s a recent article on the demoscene: Here’s some Sanity, literally, and Amiga Dreams as read for you in French - CDM Create Digital Music


The demoscene is a culture that began in the 1980s, when hackers created “cracktros” for the software they cracked… these were short audiovisual demos that showed off the skills of the hacker and often contained shoutouts to their other hackers / friends.

Over time, some hackers/artists became more interested in the audiovisual demos than they were in pirating software, and this became the birth of the “demoscene”, where programmers would create audiovisual “demos” that

CMCDragonkai / Makefile
Last active Feb 8, 2021
Runtime Conditionals in Makefiles
View Makefile
# this phony target shows how to use a conditional within a recipe
# this conditional is executed at "run-time"
# rather than at "build-time" which is when the Makefile `ifeq` are evaluated
# notice how everything in the conditional must be joined up as one line
[ "$$(echo 1)" -lt 2 ] && { \
echo 'oh no'; \
exit 1; \
} || { \
View color.c
#include "color.h"
#include "utilities.h"
#include <math.h>
* Algorithm adapted from Uses a little libmath.
* */
void color_HSV2RGB(struct color_ColorHSV const *hsv, struct color_ColorRGB *rgb) {
int i;
qguv /
Last active Mar 2, 2017
Userland talk for W&M ACM

UNIX: userland and the shell

  • GUI file managers are built on top of coreutils (GNU/BSD)
  • you can just run the coreutils directly in a shell
    • reads command and spits out the result
    • matrix of monospaced text
  • syntax: binary space arg1 space arg2 space ...


NichtJens / Makefile.cargo
Last active Mar 24, 2019 — forked from mzabaluev/Makefile.cargo
Drop-in makefile for Cargo projects
View Makefile.cargo
CARGO = cargo
all: build doc
@$(CARGO) build
@$(CARGO) doc