Skip to content

Instantly share code, notes, and snippets.

View cjbarker's full-sized avatar

CJ Barker cjbarker

View GitHub Profile
#!/bin/bash
# Llama.cpp Process Watchdog Script
# This script monitors a Llama.cpp server process and checks its health status.
# If the service fails to respond to API queries, it can optionally restart the process.
#
# Usage:
# ./watchdog-llama.sh [process_name]
# - If process_name is provided, it will monitor that specific process
# - If not provided, it defaults to "/home/cj/tmp-llama/llama-server"
@cjbarker
cjbarker / gist:545773ff1a9860b2d672667bbb1ade28
Last active April 4, 2026 22:15
llama-swap-config.yaml
macros:
"Qwen3-Coder-30B-macro": >
/home/cj/tmp-llama/llama-server \
--port ${PORT} \
-ngl 999 \
--ctx-size 131072 \
--batch-size 4096 \
--threads 16 \
--no-webui \
--timeout 300 \
@cjbarker
cjbarker / entropy_pswd_creator.sh
Created July 19, 2018 23:29
Script for creating high entropy based password strings.
#!/bin/bash
# ####################################################################################
# Script for creating high entropy based password strings.
#
# Will iterate and generating high entropy password for char length and total nbr of
# of passwords. If no password length provided Minimum length of characters in
# password string is 8.
#
# Usage: sh entropy_pswd_creator.sh [nbr-passwords] [max-pswd-length]
@cjbarker
cjbarker / vglciyml.sh
Created February 8, 2018 22:45
Validate GitLab YAML via Linting API
#!/bin/bash
# ##########################################################################
# Validate GitLab CI YAML (VGLCIYML) file via GL linter API
#
# Usage: vglciyml <yaml-file>
#
# echo $?
#
# Exit code of 0 denotes success. Non zero exit code denotes failure.
@cjbarker
cjbarker / pswd-converter.py
Created August 8, 2017 17:17
Python Script that converts passwords in file into hash digest of space/tab delimited STDOUT or GZip compressed file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ======================================================================================
# title :pswd-conver.py
# description :This will create a header for a python script.
# author :CJ Barker
# date :20170806
# version :0.1
# usage :python pswd-convert.py <password-file> [-c|--compress] [-h|--help]
@cjbarker
cjbarker / Makefile
Created June 21, 2017 22:10
Makefile for cross-compiling Golang. Just update BINARY var in Makefile and create empty vars in main.go for Version and Build
# ########################################################## #
# Makefile for Golang Project
# Includes cross-compiling, installation, cleanup
# ########################################################## #
# Check for required command tools to build or stop immediately
EXECUTABLES = git go find pwd
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH)))
@cjbarker
cjbarker / keybase.md
Created July 8, 2016 21:33
Keybase Proof

Keybase proof

I hereby claim:

  • I am cjbarker on github.
  • I am cjbarker (https://keybase.io/cjbarker) on keybase.
  • I have a public key ASAALKDuVVLmBcUn3vxGzWRb1LYbBeTOCMI32sdEmg2BPgo

To claim this, I am signing this object: