Skip to content

Instantly share code, notes, and snippets.

View ScottJWalter's full-sized avatar
🔮
Particle. Wave. It's all data.

Scott Walter ScottJWalter

🔮
Particle. Wave. It's all data.
View GitHub Profile
@ScottJWalter
ScottJWalter / WhisperCPP-Transcribe.bat
Created December 16, 2024 09:01 — forked from ThioJoe/WhisperCPP-Transcribe.bat
WhisperCPP Batch File Script
:: ---- Lines beginning with :: are comments ----
:: This script is meant to make it easy to transcribe a video file using WhisperCPP.
:: You can simply drag a video file into the cmd window, then it will use ffmpeg to extract the audio, then transcribe using WhisperCPP and output to a text file.
::
@echo off
set /p videopath="Enter the full path to the video file to transcribe: "
:: Remove quotes from the input path
set videopath=%videopath:"=%
@ScottJWalter
ScottJWalter / install-celery.sh
Last active December 15, 2024 05:05
Install celery as a system service
# install celery as a system service
sudo apt install -y python3-celery
# service file
sudo cat >/etc/systemd/system/celery.service <<EOL
[Unit]
Description=Celery Service
After=network.target,rabbitmq-server.service
Requires=rabbitmq-server.service
@ScottJWalter
ScottJWalter / install-rabbitmq.sh
Created December 15, 2024 04:18
Install RabbitMQ on Ubuntu via Cloudsmith mirrors
#!/bin/sh
sudo apt-get install curl gnupg apt-transport-https -y
## Team RabbitMQ's main signing key
curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null
## Community mirror of Cloudsmith: modern Erlang repository
curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null
## Community mirror of Cloudsmith: RabbitMQ repository
curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null
@ScottJWalter
ScottJWalter / _README.md
Created December 15, 2024 04:10 — forked from mob-sakai/_README.md
Run shell script on gist

Run shell script on gist

Shells that support process substitution such as bash and zsh allow to run shell script on gist as follows.

# With curl:
bash <(curl -sL ${GIST_URL}) args...

# With wget:
@ScottJWalter
ScottJWalter / bootstrap-docker-ubuntu.sh
Last active January 17, 2025 15:38
Install docker into Ubuntu instance (based on docs.docker.com)
#!/bin/bash
# update apt repos
sudo apt-get update
# install curl and keyring (certificate) support
sudo apt-get install -y \
ca-certificates \
curl \
python3-pip \
@ScottJWalter
ScottJWalter / notes2md.bash
Created September 15, 2024 16:46
Convert Samsung Notes to Markdown
#!/bin/bash
#
# Notes2MD -- Convert Samsung Notes to markdown
#
# This script converts Samsung Notes to markdown. Export one or more
# notes as PDF files from inside the app (I haven't found a way to automate
# this, yet) into the ${DIR_IN} folder, then run this script. It:
#
# 1. Converts the PDF to a sequence of PNG image files (placing those
# images and the original pdf in an "assets/" subfolder)
@ScottJWalter
ScottJWalter / Convert HTML to Markdown.md
Last active September 13, 2024 21:56
Convert HTML to Markdown

Convert HTML to Markdown

This is a simple bash script to convert one or more HTML files to markdown format. I created it to quickly convert a Medium export for import into my Obsidian vault.

Prerequisites

Usage

@ScottJWalter
ScottJWalter / HowToOTGFast.md
Created July 11, 2024 00:00 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@ScottJWalter
ScottJWalter / samsung_remote.py
Created July 5, 2024 17:01 — forked from danielfaust/samsung_remote.py
Samsung TV Remote Control Python Script
import time
import socket
import base64
src = '192.168.1.2' # ip of remote
mac = '00-AB-11-11-11-11' # mac of remote
remote = 'python remote' # remote name
dst = '192.168.1.3' # ip of tv
app = 'python' # iphone..iapp.samsung
@ScottJWalter
ScottJWalter / Speech Recognition.ahk
Created April 24, 2024 17:52 — forked from Uberi/Speech Recognition.ahk
Speech recognition with Microsoft's SAPI. A simple SpeechRecognizer class provides a quick and easy way to use speech recognition in your scripts. Inspired by some [prototype code](http://www.autohotkey.com/board/topic/24490-voice-recognition-com/) made a long time ago.
#NoEnv
#Warn All
#Warn LocalSameAsGlobal, Off
#Persistent
/*
Speech Recognition
==================
A class providing access to Microsoft's SAPI. Requires the SAPI SDK.