Skip to content

Instantly share code, notes, and snippets.

View undocumented-code's full-sized avatar

Undocumented Code undocumented-code

View GitHub Profile
@undocumented-code
undocumented-code / AudioTransmit.ino
Created September 29, 2019 17:46
Simplified version of Sven337's UDP Audio Streamer from ESP8266 to dockerized restreaming using FFServer
// https://perso.aquilenet.fr/~sven337/english/2016/07/14/DIY-wifi-baby-monitor.html
// Based on Sven337's Baby Monitor Code which in turn is based on
// Based on ESP_MCP3201_SPI
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiClient.h>
#include <WiFiUdp.h>
#include <ESP8266mDNS.h>
@undocumented-code
undocumented-code / FanController.ino
Created February 26, 2019 20:00
Simple Fan Controller for the TC74 and some 6 pin server fans. https://blog.tuckerosman.com/2019/02/building-temperature-based-fan.html
//See https://blog.tuckerosman.com/2019/02/building-temperature-based-fan.html for more information.
//#include <Math.h>
//#define CURVE_FACTOR 1.03
#include <TC74_I2C.h>
#define FANSPEED_PIN 4
TC74_I2C TC74(TC74_A0);
int temperature;
FROM ubuntu:18.04
ENV KEY <put your key here>
WORKDIR /root/
COPY entry.sh .
COPY windows98hd.img .
RUN chmod +x entry.sh
RUN apt -y update
RUN apt -y install software-properties-common
@undocumented-code
undocumented-code / Code.gs
Last active June 1, 2018 01:33
Google Apps Script for a Slack Bot backed by a Google Sheet. https://blog.tuckerosman.com/2018/05/make-slackbot-from-google-spreadsheet.html
function checkingLoop() {
//This is what checks every so often and sends the reminder message.
const range = getNearestDateTimeRange(moment());
if(!range) return;
const leavingCell = range.getCell(1,2);
const returnCell = range.getCell(1,3);
const leaving = leavingCell.getDisplayValue();
const returning = returnCell.getDisplayValue();
if(leaving.length) {
#include <avr/sleep.h>
#include <avr/interrupt.h>
void setup() {
//intialize the input (the power switch)
pinMode(4, INPUT);
//intialize the output (motherboard power switch)
pinMode(3, OUTPUT);
}
@undocumented-code
undocumented-code / GoogleGraphVisString.java
Last active October 5, 2015 14:50
Convert a Binary Tree to an Image
//INSTALL INSTRUCTIONS ARE IN THE LINE COMMENTS
//Put this in your binary tree class. Because Google's GraphVis API can have multiple arrows pointing to duplicates, this keeps
//track of how many spaces it needs to put in an element to keep it unique.
static int blankcount = 0;
//Put this function and its associated documentation into your binary tree class. This is what you'll call to get the url.
//You may have to fix imports because this uses java.net.URLEncoder.
/**
*