Skip to content

Instantly share code, notes, and snippets.

@omaraboumrad
omaraboumrad / splitlogs.py
Created October 6, 2017 14:18
View docker-compose services logs in split tmux panes
# Requires pyyaml
import os
import yaml
run = os.system
new_window = lambda cmd: run('tmux new-window -n "logs" "{}"'.format(cmd))
split_vertical = lambda cmd: run('tmux split-window "{}"'.format(cmd))
split_horizontal = lambda cmd: run('tmux split-window -h "{}"'.format(cmd))
even_vertical = lambda: run('tmux select-layout even-vertical')
@mads-hartmann
mads-hartmann / toggle-maximize-buffer.el
Created August 20, 2012 10:05
An Emacs function to temporarily make one buffer fullscreen. You can quickly restore the old window setup.
(defun toggle-maximize-buffer () "Maximize buffer"
(interactive)
(if (= 1 (length (window-list)))
(jump-to-register '_)
(progn
(set-register '_ (list (current-window-configuration)))
(delete-other-windows))))
;; Bind it to a key.