Skip to content

Instantly share code, notes, and snippets.

View Overemployed's full-sized avatar
🏠
Rebasing

Nat Peterson Overemployed

🏠
Rebasing
  • Several Jobs
  • Remote
View GitHub Profile
@Overemployed
Overemployed / mj.service
Last active March 30, 2023 15:20
PiKVM jiggler 2.0, 1 pixel at a time
[Unit]
Description=Mouse Script
After=network.target
[Service]
User=root
ExecStart=/bin/bash mouse.sh
WorkingDirectory=/root
Restart=on-failure
@Overemployed
Overemployed / install.sh
Last active April 18, 2024 19:08
Jacktrip running on PiKVM / Raspberry Pi with arch distro
#!/bin/bash
# Check if script is running as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# your personal machine running jacktrip
REMOTE_JACK_SERVER=nat.local
@Overemployed
Overemployed / jiggler.mjs
Last active January 27, 2023 18:51
PIKVM mouse jiggler
// assumes your mouse is in relative mode https://docs.pikvm.org/mouse/?h=relative#relative-mouse-on-v2-platform-otg-hid
// You may want to set your pikvm to support dual mode, so you can switch between absolute and relative
const { PIKVM_HOST, PIKVM_USER, PIKVM_PASSWORD, MOUSE_MODE = 'normal' } = process.env
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
import fetch from 'node-fetch';
import { path } from "ghost-cursor";
import websocket from 'websocket';
const WebSocketClient = websocket.client
let connection;
@Overemployed
Overemployed / transcribe.js
Last active December 28, 2023 23:03
Listen for a live recording and transcribe the file. Send a notification when YOUR_NAME is called
const pathParser = require("path");
const { MODEL_PATH, HOME, YOUR_NAME, FILE_GLOB } = process.env;
console.log(MODEL_PATH, HOME, YOUR_NAME, FILE_GLOB);
const chokidar = require('chokidar');
const vosk = require('vosk');
const wav = require("wav");
const { Readable } = require("stream");
const { notify } = require('node-notifier');
const TailingReadableStream = require('tailing-stream');
const recordingsDir = `${HOME}/recordings/`