Skip to content

Instantly share code, notes, and snippets.

View technovangelist's full-sized avatar

Matt Williams technovangelist

View GitHub Profile
@technovangelist
technovangelist / ollama.py
Created December 27, 2023 05:05
python file from xanmal
# I just made changes on lines 10 and 13 and used my ipaddress and it works perfectly. If it isn't working for you, there must be something wrong with the service at 192.168.1.17
import requests
def generate_next_message():
url = "http://192.168.1.17:11434/api/chat"
# Define the messages in the chat
messages = [
{
"role": "system", # I changed this from user to system
@technovangelist
technovangelist / operf.sh
Last active November 29, 2023 00:59
ollama perf
#!/bin/bash
# Function to check if a command exists
command_exists() {
type "$1" &> /dev/null ;
}
check_program_installed() {
local program=$1
@technovangelist
technovangelist / sshlastaccess.sh
Created June 1, 2023 23:48
Recently used SSH logins
#!/bin/bash
# Array to store unique public key signatures
declare -A public_keys
# Loop through auth.log files
for file in /var/log/auth.log*; do
# Check if file exists and is readable
if [ -r "$file" ]; then
# Extract public key signatures, timestamps, users, and source IP addresses
first:1.2.3.4
second:5.6.7.8
function ax -d "Make file executable"
chmod a+x $argv
end
@technovangelist
technovangelist / spotlight.lua
Created March 18, 2019 11:00
Spotlight Remote Loader
local slmb = hs.menubar.new()
slmb:setIcon("spotlightremoteicon.png")
function cyclespotlight()
local spotlightapp = hs.application.get("LogiPresentation")
if spotlightapp == nil or spotlightapp == '' then
hs.alert.show('Launching Spotlight Remote')
hs.application.open('/Library/Application Support/Logitech.localized/Logitech Presentation.localized/Logitech Presentation.app/Contents/MacOS/Logitech Presentation')
else
hs.alert.show('Killing Spotlight Remote')
for i in (seq 100);mkfile -n 3m testfile-3mb-$i;end
@technovangelist
technovangelist / keybase.md
Last active October 16, 2017 18:14
keybase.md

Keybase proof

I hereby claim:

  • I am technovangelist on github.
  • I am technovangelist (https://keybase.io/technovangelist) on keybase.
  • I have a public key ASAwAKX8y22VrWaIrmN3zWj8EVLsPqD5hFD8fk5-EGZMoQo

To claim this, I am signing this object: