This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def day6fast(chars: Iterator[Char], targetNum: Int): Option[Int] = { | |
val buffer = scala.collection.mutable.ListBuffer.empty[Char] | |
try { | |
var i = 0 | |
while (true) { | |
val c = chars.next() | |
if (buffer.length == targetNum) { | |
buffer.dropInPlace(1) | |
} | |
buffer.append(c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emulate tmux default bindings for tabs | |
# n and p for next/prev | |
map ctrl+a>n next_tab | |
map ctrl+a>p previous_tab | |
map ctrl+a>, set_tab_title | |
# 'c' for create | |
map ctrl+a>c new_tab | |
map ctrl+a>x close_tab | |
# 'zoom' in tmux | |
map ctrl+a>z toggle_layout stack |
OlderNewer