Skip to content

Instantly share code, notes, and snippets.

@binji
binji / LICENSE
Last active Jun 12, 2021
pokegb.cc w/o macros
View LICENSE
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.
View matrixflut_viewer.py
#!/usr/bin/python3
import paho.mqtt.client as mqtt
from sty import fg, bg, rs
width = height = 5
mqtt_server = "test.mosquitto.org"
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
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 "10.0.1.3"
#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
charlieroberts / equinox_marchingjs.md
Created Mar 21, 2020
Equinox Marching.js Tutorial
View equinox_marchingjs.md

Marching.js

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

Demoscene

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
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
test_conditional:
@echo 'NESTED CONDITIONAL'
[ "$$(echo 1)" -lt 2 ] && { \
echo 'oh no'; \
exit 1; \
} || { \
View color.c
#include "color.h"
#include "utilities.h"
#include <math.h>
/*
* Algorithm adapted from https://gist.github.com/hdznrrd/656996. Uses a little libmath.
* */
void color_HSV2RGB(struct color_ColorHSV const *hsv, struct color_ColorRGB *rgb) {
int i;
@qguv
qguv / userland_talk.md
Last active Mar 2, 2017
Userland talk for W&M ACM
View userland_talk.md

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 ...

exercises

@NichtJens
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
build:
@$(CARGO) build
doc:
@$(CARGO) doc