Skip to content

Instantly share code, notes, and snippets.

View teganburns's full-sized avatar
🐳
urgay

Tegan Burns teganburns

🐳
urgay
View GitHub Profile
@teganburns
teganburns / install-browser.sh
Last active October 24, 2025 03:16
Portable browser installer for zybooks venv
#!/usr/bin/env bash
# Portable Ollama-in-/tmp installer (no sudo). Starts server and pulls a tiny model.
set -euo pipefail
WORK=/tmp/ollama-local
BIN="$WORK/bin"
LOG="$WORK/ollama.log"
PORT="${PORT:-11434}"
@teganburns
teganburns / gist:bcae4bd4a70cc45b23591d3b8ef43ec6
Created December 31, 2024 21:26
Proof/MVP showing a keypress "a" using the Arduino R4 WIFI
#include <Arduino.h>
#include "HID.h"
// ---------------------------------------------------------------------------
// 1) A minimal HID report descriptor for a boot keyboard with ID=2 (to match the original code).
// This is adapted directly from your Keyboard.cpp _hidReportDescriptor[], but we only need
// the essential subset to send a single key.
// ---------------------------------------------------------------------------
static const uint8_t _hidReportDescriptor[] PROGMEM =
{
@teganburns
teganburns / text-to-speech.sh
Created June 3, 2018 08:59
Simple Script for using Google's text-to-speech API (aka. Wavenet)
#!/usr/bin/env sh
# author: Tegan Burns
# website: teganburns.com <- My website has an example of the audio!
auth_bearer="Authorization: Bearer $(gcloud auth application-default print-access-token)"
content_type="Content-Type: application/json; charset=utf-8"
text="$@"
url="https://texttospeech.googleapis.com/v1beta1/text:synthesize"
data="{'input':{'text':' $text'},'voice':{'languageCode':'en-us','name':'en-US-Wavenet-F','ssmlGender':'FEMALE'},'audioConfig':{'audioEncoding':'MP3'}}"
result=$( curl -H "$auth_bearer" -H "$content_type" --data "$data" "$url" | jq '."audioContent"' | sed -e 's/^"//' -e 's/"$//' > /tmp/result.txt)