Skip to content

Instantly share code, notes, and snippets.

@sboesen
sboesen / app.py
Last active August 10, 2025 20:03
Chainlit w/ local LM Studio LLM
import os
import json
import ast
import httpx
import chainlit as cl
from openai import AsyncOpenAI
api_key = os.environ.get("OPENAI_API_KEY")
@sboesen
sboesen / gist:f7c659ea174bcec389c3f2b180eb0b22
Created September 22, 2024 03:57 — forked from adamsmith/gist:2a22b08d3d4a11fb9fe06531aea4d67c
voice-memo transcript → organized markdown text, using LLMs
There are two prompts, that chain together. The first prompt does most of the work, and the second prompt organizes the sections. I found because of the nature of how LLMs write, I couldn't get just one prompt to never jump back and forth in topics.
Prompt 1, which takes as input a raw transcript and generates a structured-text version...
"""# Instructions
A transcript is provided below of a voice memo I recorded as a "note to self". please extract all the points made or thoughts described, and put them in bullet-point form. use nested bullet points to indicate structure, e.g. a top-level bullet for each topic area and sub-bullets underneath. use multi-level nesting as appropriate to organize the thinking logically. use markdown formatting with `*` instead of `-` for bullet points.
DO NOT OMIT ANY POINTS MADE. This is not a summarization task — your only goal is to structure the thoughts there so they are logically organized and easy to read. Be concise because the reader is busy, but again DO NOT omit any
@sboesen
sboesen / keybase.md
Created February 8, 2017 04:06
keybase proof

Keybase proof

I hereby claim:

  • I am sboesen on github.
  • I am sboesen (https://keybase.io/sboesen) on keybase.
  • I have a public key whose fingerprint is C27E FFD5 F2C1 DA51 B5CB BAAD EC28 F63D D1AC 32D4

To claim this, I am signing this object:

@sboesen
sboesen / LICENSE
Last active August 21, 2016 01:55
obj-c binja plugin
Copyright (c) 2016 Stefan Boesen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O
alpha = 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'.scan(/./)
alpha.each do |i|
key_s = "Gr34tW0RkEnjoY1T"
key_e = "";
res = `./crypt #{key_s}#{i}#{key_e}`
if res.include? "No repeated"
else
puts "#{i}: #{res}"
end
@sboesen
sboesen / rails_resources.md
Created May 10, 2014 21:24 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@sboesen
sboesen / 0_reuse_code.js
Created May 10, 2014 21:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
use std::io::BufferedReader;
use std::io;
use rand::Rng;
fn main() {
println!("INPUT:");
let mut reader = BufferedReader::new(io::stdin());
let input = reader.read_line().unwrap();
let num = from_str::<int>(input.slice_to(input.len() -1));
test gist
sdf% which bboard
/usr/pkg/bin/bboard
sdf% ls -l /usr/pkg/bin/bboard
---x--s--x 1 com com 7356 Aug 7 2013 /usr/pkg/bin/bboard
sdf% cp /usr/pkg/bin/bboard .
cp: /usr/pkg/bin/bboard: Permission denied
sdf% uname -a
NetBSD sdf 6.1_STABLE NetBSD 6.1_STABLE (SDF6.amd64) #0: Tue Nov 26 12:49:14 UTC 2013 root@bjork:/spare/netbsd/src/sys/arch/amd64/compile/SDF6.amd64 amd64
sdf%