Skip to content

Instantly share code, notes, and snippets.

View JayGoldberg's full-sized avatar

Jay Goldberg JayGoldberg

  • Google
  • San Francisco, CA, USA
View GitHub Profile
@JayGoldberg
JayGoldberg / README.md
Last active October 11, 2025 18:26
different attempts to get Wi-Fi probe request observation working on ESP32

ESP32 probe request sniffer

At first I started with the flock-you project to get a basic ESP32 monitor (promiscuous) mode dump of Wi-Fi SSID (directed) probe requests. But I could not get them this way.

  1. removed the MAC and SSID filtering to show all packets
  2. It seemed to only classify all packets as wild card probes. I saw no directed probes.
  3. I tried to remove logic to find the offset of SSID in the probe requests to see the error and got lost

Tried to use a method that didn't use wifi_ieee80211_mac_hdr_t struct to somehow dump hex or strings of the contents, got confused, made little progress.

@JayGoldberg
JayGoldberg / rpi_install_headless_2025.md
Last active September 11, 2025 03:53
Headless configuration of Raspberry Pi OS in 2025, specifically Bookworm

Headless installation of Raspberry Pi OS on ChromeOS (Bookworm)

This will get you a TF / MicroSD card with preconfigured headless Raspberry Pi OS with:

  • hostname configured
  • user account and password configured
  • wifi network and credentials to connect to Wi-Fi
  • SSH enabled
  • keyboard layout & timezone set (locale)
@JayGoldberg
JayGoldberg / castanet.sh
Created August 26, 2025 00:36 — forked from interfect/castanet.sh
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.
@JayGoldberg
JayGoldberg / ptt_audio_download.html
Created August 6, 2025 17:43
A "push-to-talk" app. This example uses plain HTML and JavaScript, leveraging the MediaDevices API for microphone access and the MediaRecorder API to handle the recording. Handles all the logic: requesting microphone access, starting and stopping the recording based on button presses, and creating a downloadable link for the final audio file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Push-to-Talk Recorder</title>
<style>
body {
font-family: sans-serif;
display: flex;
@JayGoldberg
JayGoldberg / whelen.html
Last active August 5, 2025 04:26
Whelen/Whelan airhorn emulator in a webpage. Modulates a square wave with a sine wave (FM synthesis)
<!DOCTYPE html>
<!-- https://www.youtube.com/watch?v=6JO1F9xD3rU -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FM Synthesis</title>
<style>
body {
font-family: 'Inter', sans-serif;
@JayGoldberg
JayGoldberg / streams-generator-i2s.ino
Last active August 3, 2025 17:36
generates a square wave using the AudioTools library and outputs it as an I2S audio stream, likely for an ESP32 or similar microcontroller with I2S capabilities.
/**
* @file streams-generator-i2s.ino
* @author Phil Schatzmann
* @brief see https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-stream/streams-generator-i2s/README.md
* @copyright GPLv3
*/
#include "AudioTools.h"
AudioInfo info(44100, 1, 16);
@JayGoldberg
JayGoldberg / esp_wavplay.ino
Last active August 4, 2025 00:01
Play WAV files from SPIFFS to i2s using arduino-audio-tools (e.g. ESP8266 & ESP32)
// using https://github.com/pschatzmann/arduino-audio-tools
// upload to SPIFFS with https://github.com/espx-cz/arduino-spiffs-upload for Arduino 2.x (non-JAR),
// place your WAV files in data/ in the sketch folder
#include "AudioTools.h"
#include "AudioTools/Disk/AudioSourceSPIFFS.h"
#include "AudioTools/AudioCodecs/CodecWAV.h"
// Define your custom I2S pins for ESP32
// IMPORTANT: These are GPIO numbers.
const int I2S_BCLK_PIN = 2;
@JayGoldberg
JayGoldberg / cam1.conf
Last active May 31, 2025 20:11
Camhi patrol automation for PTZ cameras
# ~/.config/ptz/cam1.conf
# Configuration for camhi camera patrol (CGI API)
# This file contains sensitive information and configuration.
# DO NOT COMMIT THIS FILE TO GIT!
# Camera Credentials
CAMERA_HOST="cam1.lan"
CAMERA_USER="admin"
CAMERA_PASS="mypass" # <--- CHANGE THIS TO YOUR REAL PASSWORD
@JayGoldberg
JayGoldberg / GCPmakeSpeech.sh
Last active August 6, 2025 00:43
Script to generate audio output from Google Text-to-Speech API
#!/bin/bash
# GCPmakeSpeech.sh
# run in Google Cloud Shell in the Cloud Console
# adapted from https://cloud.google.com/text-to-speech/docs/create-audio-text-command-line
# Check if text argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 \"TEXT_TO_SYNTHESIZE\" [OUTPUT_FILE.mp3]"
exit 1
fi
@JayGoldberg
JayGoldberg / README.md
Last active January 18, 2025 18:55
Apps Script email Google form responses automatically, with the responses inside the email

When someone submits a response to a Google Form, you get an email telling you that someone submitted a response but not what they actually submitted

That suuuucks.

So this project is meant to send you the actual response the person entered, and if you capture their email, the Reply feature in your email client will go back to the respondent.

  1. Insert this code into the Script editor of the Google Form.
  2. Copy the template into an HTML file in the script editor
  3. Install a From form - On form submit trigger to call sendFormResponseByEmail() when someone submits the form.