Skip to content

Instantly share code, notes, and snippets.

View qguv's full-sized avatar
vibing

Quint Guvernator qguv

vibing
View GitHub Profile
#!/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))
#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 April 11, 2020 16:04
M5 Atom MQTT to IR bridge for controlling Edifier speakers
// 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/"
#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 March 21, 2020 00:38
Equinox Marching.js Tutorial

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

@muodov
muodov / cheatsheet.js
Last active April 24, 2024 10:05
JS prototype inheritance cheatsheet
// normal function x
function x() {
this.a = 1;
}
// First of all, the term "prototype" is confusing because it can refer to 2 different things.
// There is an object's prototype, which is another object used to look up missing properties.
// But there is also an actual `prototype` property on Function and class objects, which is NOT a prototype for that function object!
// Instead, it serves a very specific purpose: that object becomes a prototype of all instances returned when that function is used as a constructor:
(new x()).__proto__ === x.prototype
:xdg-support: https://wiki.archlinux.org/index.php/XDG_Base_Directory
:xdg-spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
:fhs: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
:madness: http://pub.gajendra.net/2012/09/dotfiles
:litter: https://www.reddit.com/r/linux/comments/971m0z/im_tired_of_folders_littering_my_home_directory/
:systemd: https://www.freedesktop.org/wiki/Software/systemd/
:systemd-fhs: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
:systemd-fhs-bin: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html#~/.local/bin/
:toc: macro
@muodov
muodov / empty-hash-assignment.md
Last active February 24, 2022 17:42
Location and links behaviour when setting empty hash
Command (executed in this order) Chrome 72 Firefox 65 Safari 12.0.3 IE11
window.location.hash "" "" "" ""
window.location.href "https://example.com/" "http://example.com/" "http://example.com/" "http://example.com/"
window.location.hash = '#' "#" "#" "#" "#"
window.location.href "https://example.com/" "http://example.com/#" "http://example.com/" "http://example.com/#"
window.location.hash "" "" "" "#"
window.location.hash = '#1' "#1" "#1" "#1" "#1"
window.location.href "https://example.com/#1" "http://example.com/#1" "http://example.com/#1"
@CMCDragonkai
CMCDragonkai / Makefile
Last active February 8, 2021 23:50
Runtime Conditionals in Makefiles
# 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; \
} || { \
@qoomon
qoomon / conventional_commit_messages.md
Last active May 4, 2024 12:39
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default