Skip to content

Instantly share code, notes, and snippets.

@matthewtodd
matthewtodd / tmux
Created January 27, 2011 11:30
script/tmux
#!/bin/sh
tmux start-server
if ! $(tmux has-session -t grow); then
tmux new-session -d -s grow -n foreground
tmux send-keys 'cd .' C-m C-l
tmux send-keys 'AUTOFEATURE=true autotest --quiet' C-m
tmux split-window -h
tmux send-keys 'cd .' C-m C-l
@yhara
yhara / zipper.rb
Created August 7, 2008 07:41
Ruby implementation of Zipper (and its spec)
#
# Zipper has @left and @right.
# When a zipper represents [1, 2, 3, <cursor>, 4, 5],
# @left == [3, [2, [1, []]]], @right == [4, [5, []]]
# Note that @left is in reverse order.
#
class Zipper
include Enumerable
def self.make(*vals)