Skip to content

Instantly share code, notes, and snippets.

@cfcfs
cfcfs / day01.clj
Last active December 1, 2022 17:52
aoc2022.01
(defn get-lines [fname] (string/split-lines (slurp fname)))
(defn group-lines [lines]
(reduce
#(if (string/blank? %2)
(cons '() %1)
(cons (cons %2 (first %1)) (next %1)))
'(()) lines))
(defn sum-groups [groups] (map #(reduce + 0 (map read-string %1)) groups))
@cfcfs
cfcfs / macos-tmux-256color.md
Created November 3, 2022 01:49 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):