Skip to content

Instantly share code, notes, and snippets.

View adamsmith's full-sized avatar

Adam Smith adamsmith

View GitHub Profile
@adamsmith
adamsmith / gist:2a22b08d3d4a11fb9fe06531aea4d67c
Created December 23, 2023 01:07
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
@adamsmith
adamsmith / apple_voice_memo_handler.py
Last active March 22, 2024 22:16
Automated Apple Notes transcription to Markdown file
import os
import datetime
import json
import pathlib
import secrets
import sqlite3
import subprocess
import time
# Description: This code continuously polls for new Apple Voice Memos. When a new one is found, it is transcribed using
// License: public domain
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace CommonCode {
//Eldrian
//email:eldrian98@hotmail.com
//Codeacademy , Javascript , Object 2 Exercise 6
//Finds out if objects has the stated property
var myObj = {
// finish myObj
name:"eldrian",
};
console.log( myObj.hasOwnProperty('name') ); // should print true
@adamsmith
adamsmith / ms-outlook-addin-advice.txt
Created October 23, 2012 17:31
Advice on writing MS Outlook Addins
(Hi, I'm Adam Smith. I started Xobni in 2006, which has written the most sophisticated and successful MS Outlook addin in history. This took millions of dollars and several years of work by some of the best programmers in the valley. Other startups have thrown millions of dollars at building Outlook addins and failed. This is my take on the idea of building a new MS Outlook addin as of 2012.)
My general advice is avoid any Outlook addins or desktop software if at all possible. More and more stuff is moving to the web, and the table stakes of doing anything reasonably well in Outlook are remarkably high. Consider it to be on the same level of making hardware with regards to the cost of bugs/mistakes, amount of black art, etc., but maybe a little higher since there's a much weaker ecosystem of people doing it. I pasted below in this email an old list of "gotchas" or things-to-know I made after leaving Xobni. It's not comprehensive but will include some of the biggest ones from a pain perspective.
The
@adamsmith
adamsmith / gist:3485120
Created August 27, 2012 02:31
AutoHotKey script for Outlook single-button keyboard shortcuts (a, r, f, and n)
; in Outlook, a -> Archive, r -> Reply, f -> Forward, n -> New
; derived from http://www.autohotkey.com/community/viewtopic.php?t=41790
; Note: set up Ctrl + Shift + 1 to be 'Archive' as a Quick Step for the shortcut to work
SendMode Input ; superior speed and reliability.
SetTitleMatchMode 2 ;allow partial match to window titles
;********************
@adamsmith
adamsmith / gist:3458680
Created August 25, 2012 01:51
Change reply format in Outlook to HTML and insert signature
' I like to read messages in Plain Text, but I want to reply in HTML, and I have HTML markup in my
' email signature. Outlook doesn't let you read in Plain Text and reply in HTML by default.
' My VBA code to do this is below. It watches for new Compose windows, and when appropriate
' switches the format to HTML, and inserts my signature, followed by down, down, delete delete up
' up up up (sounds like a video game code, I know; it removes two annoying line breaks after the
' sig and moves the cursor to the top)...
@adamsmith
adamsmith / FontFamilies.cs
Created October 5, 2011 00:41
Sets fonts in forms to the first-available font in a list of fonts. Adjusts size of fonts to match a baseline font, so e.g. 9pt Calibri will be the same size as 9pt Verdana.
// Author: Adam Smith <adam@adamsmith.cc>
// License: public domain
internal static class FontFamilies {
static FontFamilies() {
DefaultAppFontFamily = GetFirstAvailableFontFamily(new string[] { "Segoe UI", "Calibri", "Verdana" });
Log.Logger.Debug(string.Format("Using font family {0}", DefaultAppFontFamily.Name));
HeightTargetFontFamily = GetFirstAvailableFontFamily(new string[] { "Verdana" });