Skip to content

Instantly share code, notes, and snippets.

I want you to comment on this Zsh Voice mode program. What are some good usability or feature enhancements to consider? ypeset -g SAYMODE_ENABLED=false
typeset -g LAST_COMMAND_OUTPUT=""
typeset -g DEFAULT_PROMPT="$PROMPT"
################################################################################
@tkuriyama
tkuriyama / gist:ef28d12e496b8670d5bee74f787f4f9a
Created February 24, 2025 02:24
mistral_llm_output_voicemode_1.sh
# Initialize the toggle variable
typeset -g VMODE_ENABLED=false
# Define a function to wrap command execution
function speak_output() {
# Capture the output of the command
local output=$(eval "$@" 2>&1)
# Print the output to the terminal
echo "$output"
@tkuriyama
tkuriyama / Emacspeak_OSX_installation_instructions.sh
Created May 30, 2022 18:41 — forked from AmandaKLacy/Emacspeak_OSX_installation_instructions.sh
Instructions for setting up Emacspeak on the Mac.
### Step-by-step terminal instructions to install emacspeak on OS X.
### Note by Amanda Lacy
### This file is based on the set of instructions at this link:
### https://gist.github.com/izahn/cd784303663083ee2c95
### Also, thanks to Haden Pike, Tyler Littlefield, David Tseng and others on the Program-L list for their extra tips on Emacspeak settup.
### Those extra steps are at the botom of this file.
### End note
### If you are feeling lucky you can copy and paste this whole file into
@tkuriyama
tkuriyama / Eratosthenes.elm
Created October 30, 2021 16:28
Elm Eratosthenes
module Examples.Eratosthenes exposing (..)
{-| Sieve of Eratosthenes examples.
See <https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf> for further details on the algorithms.
-}
import Dict
import Generator as G
@tkuriyama
tkuriyama / setup-js2.el
Last active September 2, 2021 14:11
initial setup for js2 mode in emacs
(use-package js2-mode
:ensure t
:mode
(("\\.m?js\\'" . js2-mode))
:config
(add-hook 'js2-mode-hook
(lambda () (interactive) (column-marker-1 80)))
;; Better imenu
(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)
@tkuriyama
tkuriyama / pcap_sample.org
Last active January 7, 2021 16:08
PCAP_Sample_Deconstruction
@tkuriyama
tkuriyama / RiskTable.txt
Created September 17, 2020 15:36
Risk Win Probabilities
Win probabiloity for A
A: 1 B: 1 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 2 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 3 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 4 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 5 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 6 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 7 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 8 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
A: 1 B: 9 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1
@tkuriyama
tkuriyama / cis_194_hw12.hs
Last active September 17, 2020 15:15
Game of Risk
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Risk where
import Control.Monad.Random
import Control.Applicative
import Data.List (sort, group)
import qualified Data.Map as M (fromList, Map, lookup)
import Data.Ratio
@tkuriyama
tkuriyama / cis_194_hw11.hs
Created September 15, 2020 16:13
CIS 194 Week 11
module SExpr where
import AParser
import Control.Applicative
import Data.Char
------------------------------------------------------------
-- 1. Parsing repetitions
------------------------------------------------------------
@tkuriyama
tkuriyama / cis_194_hw10.hs
Last active September 13, 2020 20:08
CIS 194 Week 10
module AParser where
import Control.Applicative
import Data.Char
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) }
satisfy :: (Char -> Bool) -> Parser Char
satisfy p = Parser f
where