Skip to content

Instantly share code, notes, and snippets.

View bfollington's full-sized avatar
😈
scheming

Ben Follington bfollington

😈
scheming
View GitHub Profile
@bfollington
bfollington / transcribe.sh
Created February 17, 2025 06:08
Transcribe from microphone
#!/bin/bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Function to install mlx_whisper using uv
install_mlx_whisper() {
if command_exists uv; then
@bfollington
bfollington / caption_video.sh
Created February 8, 2025 01:42
MLX Whisper + FFMpeg video caption script
#!/bin/bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Function to install mlx_whisper using uv
install_mlx_whisper() {
if command_exists uv; then
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Holographic Stickers with Improved Lighting</title>
<style>
body { margin: 0; overflow: hidden; }
canvas { display: block; }
</style>
@bfollington
bfollington / contributions.py
Created November 12, 2023 23:56
Contribution Graph for Directory
import calendar
from datetime import datetime, timedelta
from pathlib import Path
import platform
def create_ascii_art_grid():
# Get the current year
current_year = datetime.now().year
start_date = datetime(current_year, 1, 1).date() # Convert to date
end_date = datetime(current_year, 12, 31).date() # Convert to date
I am attesting that this GitHub handle bfollington is linked to the Tezos account tz1XHjbFVsAqp1J2gS9wbMXXMTv1cbh4F915 for tzprofiles
sig:edsigtwzLSLDr9RMKL4ZiKHp1hWgZ9ix9DvBWWF934p4RhYjcGenFgbnrGM7grWK5qXysPv9onXRzAeXBtVPXVRdTHod4td52hX
@bfollington
bfollington / ExampleUse.cs
Last active January 26, 2021 03:07
Simple object pooling solution
public static class ExampleUse {
public static void Example(ObjectPoolingSystem pool) {
pool.Get(ObjectPoolType.SelectFx, fx => {
fx.transform.position = new Vector3(1, 1, 1);
});
}
}
@bfollington
bfollington / release.sh
Created January 9, 2021 06:42
Release cljs build in itch compatible format
# run `lein uberjar` before releasing
echo "preparing..."
mkdir -p ./dist/js
mkdir -p ./dist/css
mkdir -p ./dist/assets
echo "copying files..."
cp ./target/cljsbuild/public/js/app.js ./dist/js/app.js
cp -r ./resources/public/css ./dist
(defn contains-in?
[m ks]
(not= ::absent (get-in m ks ::absent)))
(defn update-in-if-contains
[m ks f & args]
(if (contains-in? m ks)
(apply (partial update-in m ks f) args)
m))
@bfollington
bfollington / ping-urls.clj
Last active September 12, 2020 10:03
Check response time from a list of URLs every second
(ns cursive-test.core
(:require [clj-http.client :as client])
(:require [clojure.core.async :as async]))
; setup async pipelines
(def publisher (async/chan))
(def publication
(async/pub publisher #(:topic %)))
@bfollington
bfollington / workflow.fs
Last active July 22, 2020 04:48
Imagining a workflow DSL
module Sketch
type Step =
| VSI
| BusinessAddress
| Offer
| AccountHolder
| BusinessDetails
| Identity
| Concessions