start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| iatest=$(expr index "$-" i) | |
| ####################################################### | |
| # SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
| ####################################################### | |
| # Source global definitions | |
| if [ -f /etc/bashrc ]; then | |
| . /etc/bashrc |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| # First remove *all* keybindings | |
| unbind-key -a | |
| # Now reinsert all the regular tmux keys | |
| bind-key C-b send-prefix | |
| bind-key C-o rotate-window | |
| bind-key C-z suspend-client | |
| bind-key Space next-layout | |
| bind-key ! break-pane | |
| bind-key \" split-window |
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
| import redis | |
| import threading | |
| class Listener(threading.Thread): | |
| def __init__(self, r, channels): | |
| threading.Thread.__init__(self) | |
| self.redis = r | |
| self.pubsub = self.redis.pubsub() | |
| self.pubsub.subscribe(channels) | |
| def adj(g): | |
| """ | |
| Convert a directed graph to an adjacency matrix. | |
| Note: The distance from a node to itself is 0 and distance from a node to | |
| an unconnected node is defined to be infinite. | |
| >>> g = {1: {2: 3, 3: 8, 5: -4}, |