Skip to content

Instantly share code, notes, and snippets.

View EdNutting's full-sized avatar
🎯
Focusing

Ed Nutting EdNutting

🎯
Focusing
View GitHub Profile
@EdNutting
EdNutting / ws-client.js
Created May 21, 2023 14:51
NodeJS Websocket Test Client
let WebSocketClient = require('websocket').client;
let uuid = require('uuid');
function runClient(clientIndex) {
const port = process.argv[2] || 9160;
const id = `${uuid.v4()}-${port}-${clientIndex.toString().padStart(3, '-')}`;
let timeoutId = null;
const client = new WebSocketClient();
#include <ESP8266WiFi.h>
#include "MQ135.h"
#include "DHTesp.h"
DHTesp dht;
MQ135 mq135_sensor = MQ135(A0);
float accumTemperature = 0.0;
float accumHumidity = 0.0;
float accumPPM = 0.0;
open import Data.List
import Data.List.Any as LAny
open import Relation.Binary as B
open import Relation.Binary.PropositionalEquality
open import Data.Nat
_∈_ : ∀ {a} {A : Set a} → A → List A → Set a
a ∈ as = LAny.Any (a ≡_) as
open import Data.Nat as Nat
module Irrelevance-Issue (someMax₁ : ℕ) where
open import Level using () renaming ( _⊔_ to _⊔ₗ_)
open import Function
open import Data.Fin as Fin renaming (_≟_ to _≟f_)
hiding (_<_; _≤_; _+_)
open import Data.Product as Product
@EdNutting
EdNutting / SimpleBeautifulGantt.html
Created August 9, 2019 10:15
A very simple, nice-looking Gantt chart generator using JS/HTML/SVG. Easily configured using JS objects. Just open locally in a browser.
<!--
MIT License
Copyright (c) 2019 Ed Nutting
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
@EdNutting
EdNutting / peg_solitaire.py
Created December 11, 2018 13:31
Simple version of Peg Solitaire in Python
import os, sys
from enum import Enum
# Enumerables used to define machine-checkable values
# They also make the code more readable and flexible
# Stores possible inputs
class InputType(Enum):
QUIT = -1 # 'q' - Immediately quit the game
NONE = 0 # Blank input - indicates nothing