Skip to content

Instantly share code, notes, and snippets.

View navicore's full-sized avatar

Ed Sweeney navicore

View GitHub Profile
@navicore
navicore / reciprocal.ss
Last active August 29, 2023 05:45
scratch file while re-learning scheme in racket
(define reciprocal
(lambda (n)
(if (= n 0)
"oops!"
(/ 1 n))))
@navicore
navicore / August_2023 _LMs_and_Me.md
Last active August 19, 2023 13:04
August 2023 LMs and Me

August 2023 LMs and Me

I spent yesterday with langchain tutorials. It works. I hated the workflow because I hate python project and build issues and using jupyter w/o tab completion. I suspect I can find a jupyter IDE with vim bidings. Or I'll use Rust and llm-chain.

But it is a waste of time - the messyness and fragility of gaming prompts to get something needed in an intermediate step shows me what debugging will be all about and how fragile the thing is and the moronic assumptions everyone are making - these working prompts found / gamed during dev are not deterministic and will break and fuck us all if the app is doing something that matters.

#!/bin/bash
# Check if yq is installed
if ! command -v yq &> /dev/null; then
echo "yq is not installed. Please install it first."
exit 1
fi
# Initialize the CSV header
echo "alert,team,severity,filename"
@navicore
navicore / alert-rpt.sh
Last active April 29, 2023 04:30
bash scritp to walk a repo looking for prometheus alerts and give the git info for each alert in a csv report
#!/bin/bash
# Set the file pattern
file_pattern="telemetry*.yaml"
# Set the Git repository path
repo_path="."
# Initialize the report with header
report="alert_name,first_added,first_added_user,last_changed,last_changed_user,file_path\n"
Hi Tris,
Regarding your invitation to imagine a character, as a teen in the late 1970s I
was a gas station attendant at a garage that had been a Chrysler dealership many
years earlier - the garage itself had been in business since the 1930s and Ernie,
the owner, my boss, had started there in the 30s as a teen, working his way up
to eventually buying the place.
They had broken tech from even earlier times! There was a pair of broken
teletypes/teleprinters they had in the past used to locate parts with from
@navicore
navicore / llms_2023.md
Last active April 3, 2023 03:24
Thoughts on LLMs March 2023

Thoughts on LLMs March 2023

Exciting times!

Fantastic tools I use myself constantly as of December '22.

I agree this is world changing on the scale of the PC and the the Internet.

import requests
import json
import os
# Replace with your GitHub username and personal access token
username = 'navicore'
token = 'CHANGEME'
# API endpoint to fetch repositories sorted by updated_at in descending order
api_url = f'https://api.github.com/users/{username}/repos?sort=updated&direction=desc&per_page=25'
import os
parent_directory = "."
required_file = "renovate.json"
# Create the output Bash script file
with open("delete_dirs_without_required_file.sh", "w") as script_file:
script_file.write("#!/bin/bash\n\n")
# Iterate through directories in the parent directory
@navicore
navicore / bad_ssl.md
Created March 22, 2023 14:12
mTLS SSL TLS debug validate
@navicore
navicore / klog.sh
Created March 6, 2023 23:15
kubectl logs bash deployments
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 DEPLOYMENT_NAME"
exit 1
fi
DEPLOYMENT_NAME="$1"
LOG_DIR="./logs"