Skip to content

Instantly share code, notes, and snippets.

@b333z
b333z / gist:1048400
Created June 27, 2011 06:35 — forked from maxsum-corin/gist:1044165
Multiple windows in vim
:split filename
ctrl-w w split window and load another file
:vsplit filename
ctrl-w v vertical split
:hide
ctrl-w q close current window
ctrl-w arrow move cursor up/down/left/right a window
ctrl-w ctrl-w move cursor to another window (cycle)
@b333z
b333z / gist:4290844
Last active October 14, 2015 02:07 — forked from anonymous/gist:4290841
git add .gitkeep to working dir tree to preserve empty dirs
find . -type d -empty -exec touch {}/.gitkeep \;
@b333z
b333z / generate-compose.sh
Created December 27, 2017 10:48 — forked from derFunk/generate-compose.sh
generate docker-compose.yml by inspecting a running container
docker-yml() {
docker inspect -f $'
version: '2.2'
services:
{{.Name}}
image: {{.Config.Image}}
entrypoint: {{json .Config.Entrypoint}}
command: {{json .Config.Cmd}}
environment: {{range .Config.Env}}
- {{.}}{{end}}