Skip to content

Instantly share code, notes, and snippets.

View kbloom's full-sized avatar

Ken Bloom kbloom

View GitHub Profile
import scala.util.continuations._
class Generator[A] extends Iterator[A] with (A => Unit @ suspendable) {
private var a: Option[A] = None
private var k: Option[Unit => Unit] = None
def next = {
val a0 = a.get
val k0 = k.get
a = None
@kbloom
kbloom / gist:757999
Created December 29, 2010 01:09
OpenOffice Calc regex matching macro
Function regex(a,b,c)
' Attention - made by novice, so can contain bugs
' a - string or cell to search in
' b - regexp string or cell containing regexp string
' c - back-reference number - analogy to \n in regexp syntax
' prepare regexp search options
@kbloom
kbloom / .zshrc
Last active March 1, 2022 15:13
.zshrc
KEYTIMEOUT=1
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt appendhistory extendedglob interactivecomments
unsetopt autocd nomatch
unsetopt menucomplete automenu
bindkey -v
zstyle :compinstall filename "$HOME/.zshrc"