Skip to content

Instantly share code, notes, and snippets.

@ljredux
ljredux / beep-loop.ps1
Last active October 13, 2023 11:56
Simulates periodic beeping with customizable frequency, duration, and interval. Outputs timestamps with each beep. Devised to keep my Oticon TV Streamer awake in extended low volume situations so the default frequency is set beyond the range of human hearing. Adjust the value to a number between 3000 and 9000 for a more satisfying audible beep.
param (
[int]$Frequency = 32767, # Beep frequency (37 to 32767)
[int]$Duration = 35, # Beep duration in milliseconds.
[int]$Interval = 240 # Beep interval in seconds (delay between beeps)
)
$FrequencyKHz = $Frequency / 1000
Write-Output "Simulating a ${Duration}ms ${FrequencyKHz}kHz beep every $Interval seconds."
# Infinite loop to produce beeping sound and timestamp
@ljredux
ljredux / balloon-tip.ps1
Created June 13, 2023 18:15
Simple Windows Notification with Powershell
function Show-BalloonTip {
param (
[string]$Title,
[string]$Text,
[ValidateSet('Error', 'Info', 'None', 'Warning')]
[string]$IconType = 'None',
[int]$Duration = 20000
)
Add-Type -AssemblyName System.Windows.Forms
@ljredux
ljredux / lloader.bat
Last active May 14, 2023 11:46
Llama Loader - A bat file which cycles through .bin (model) files in the same folder as llama.cpp (https://github.com/ggerganov/llama.cpp) executables and asks the user which one to load. An asterisk denotes the previous model loaded.
@echo off
:start
title llama.cpp
setlocal EnableDelayedExpansion
echo Llama Loader v0.3 by ljredux
echo An asterisk signifies the model which was previously loaded.
echo.
if exist selected_model.txt (