Skip to content

Instantly share code, notes, and snippets.

View ianmiell's full-sized avatar

Ian Miell ianmiell

View GitHub Profile
#!/bin/zsh
set -o errexit
cd /media/storage_1/photos_and_vids
for f in $(find . -type f | grep -Ei '(.jpg$|.jpeg$|.gif$|.png$|.bmp$)')
do
new_name="$(llava-v1.5-7b-q4.llamafile --cli --image $f --temp 0 --grammar 'root ::= [a-z]+ (" " [a-z]+)+' -n 30 -e -p '### User: The image looks like it has within it (described very concisely)...\n### Assistant:' --silent-prompt 2>/dev/null | sed -e's/ /_/g')"
suffix="${f##*.}"
filename="$(basename $f)"
dirname="$(dirname $f)"
old_filename="${filename%.*}"
#!/bin/bash
# 0 * * * * /Users/imiell/git/work/bin/home/slack_start_stop.sh start
# 3-59 * * * * /Users/imiell/git/work/bin/home/slack_start_stop.sh stop
DO_START=0
DO_STOP=0
while [ "$1" != "" ]; do
case $1 in
FROM centos
# Git setup
RUN yum install -y git
RUN git config --global push.default simple
RUN git config --global user.name approved_user
RUN git config --global user.email approved@corp.com
# Setup github
WORKDIR /root
@ianmiell
ianmiell / ANSI.md
Created February 12, 2023 13:25 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
{
"name": "flare",
"children": [
{
"name": "the analytics of something is a very long sentence\ndoes this work to make things a bit more readable",
"children": [
{
"name": "How would this work with an AgglomerativeCluster node being there",
"children": [
{"name": "How would this work with an AgglomerativeCluster node being there", "size": 39380},
@ianmiell
ianmiell / gist:a279edb1d102c519f96ca1961d630a51
Last active January 18, 2022 17:50
Show all crons running on your system
#!/bin/bash
# Adapted from an answer on: https://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users
set -eu
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
CRONDIR='/etc/cron.d'
height: 800
@ianmiell
ianmiell / git-remote-url
Created April 1, 2021 08:05
Script to get git repo link
#!/bin/bash
# based on: https://stackoverflow.com/questions/47524709/how-to-get-the-full-path-of-a-file-in-a-git-remote-repo
#set -o xtrace
set -o errexit
set -o nounset
set -o pipefail
function usage {
echo "$0 [ -h/--help ] [ FILENAME ]"
@ianmiell
ianmiell / .block
Last active February 5, 2021 12:47 — forked from magjac/.block
Growing Graphviz Edges
height: 800
@ianmiell
ianmiell / 3
Created September 16, 2019 06:40
3