This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 = | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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) |