Skip to content

Instantly share code, notes, and snippets.

@atmin
atmin / tmux-debian-wheezy
Created June 16, 2016 05:10
Install tmux > 1.8 on Debian Wheezy
# tmux 1.8 offers Zoom mode
sudo add-apt-repository ppa:pi-rho/dev
sudo apt-get update
sudo apt-cache show tmux # list tmux versions
sudo apt-get install tmux=LAST_VERSION_LISTED
function dom<T extends HTMLElement>(
name: string,
props: { [key in keyof T]?: any } = {},
children: Array<HTMLElement> = []
): T {
const result = document.createElement(name);
Object.entries(props).forEach(([name, prop]) => (result[name] = prop));
children.forEach(child => result.append(child));
return result as T;
}