Skip to content

Instantly share code, notes, and snippets.

@fredowsley
fredowsley / gist:50cdadfb7297626383dcdfcbcb308c60
Last active December 8, 2023 19:06
HomeAssistant on RaspbianOS 12 Bookworm
sudo apt-get update
sudo apt-get upgrade
sudo reboot
sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff6 libturbojpeg0-dev tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev libopenblas-dev npm snapd
sudo useradd -rm homeassistant -G dialout,gpio,i2c
sudo mkdir /srv/homeassistant
@fredowsley
fredowsley / ukrchase.ino
Created February 27, 2022 23:42
FastLED Ukraine Flag Chaser
#include <FastLED.h>
#define NUM_LEDS 160
#define DATA_PIN 6
// Define the array of leds
CRGB leds[NUM_LEDS];
int mid = NUM_LEDS/2;
void setup() {
#include <FastLED.h>
#define NUM_LEDS 160
#define DATA_PIN 6
CRGB leds[160];
int x;
void setup() {
FastLED.addLeds<WS2812B, 6>(leds, 160);
}
@fredowsley
fredowsley / ukrflag.ino
Created February 27, 2022 23:01
FastLED Ukraine flag static
#include <FastLED.h>
#define NUM_LEDS 160
#define DATA_PIN 6
// Define the array of leds
CRGB leds[NUM_LEDS];
int mid = NUM_LEDS/2;
void setup() {
@fredowsley
fredowsley / ukrblink.ino
Created February 27, 2022 22:33
FastLED Ukraine Flag colors blink
const http = require('http');
const randexp = require('randexp').randexp;
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.writeHead(200, {
'Content-Type': 'text/html'
@fredowsley
fredowsley / RandoHangout.js
Last active March 25, 2020 16:45
Create random Google Hangout links, find random meetings.
const http = require('http');
const randexp = require('randexp').randexp;
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.writeHead(200, {
'Content-Type': 'text/html'
/*
* WiFi Scanner for WiMos D1
* Fred Owsley - @fredowsley
* Use Adafruit_SSD1306 libs from https://github.com/tekk/MeteoESP/tree/master/lib/Adafruit_SSD1306-esp8266-64x48
* or this one: https://github.com/mcauser/Adafruit_SSD1306/blob/esp8266-64x48
*/
#include <SPI.h>
#include <Wire.h>
#include <Time.h>