(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
def make_complete_graph(num_nodes): | |
"""takes number of nodes and returns a dict that represents | |
a complete graph(no self loops) with num_nodes""" | |
return {x: set([(lambda y: y)(y) for y in xrange(num_nodes) if y!= x]) for x in xrange(num_nodes)} | |
#remove the y!=x condition for self loops |
def count_set_bits(i): | |
return bin(i).count('1') | |
def sort_set_bits(lst): | |
"""sorts a list based on the number of set bits in each digit""" | |
return sorted(lst, key=count_set_bits) |
"""takes a list x and returns a list with odd integers or elements with even index""" | |
[i for idx,i in enumerate(x) if (type(i) is int) and (i%2 !=0 or idx%2==0)] |
"""finds the shortest path that an ant could take to reach a point from another | |
constraint: the ant can move only to the right or up at any point | |
""" | |
grid_order = 4 | |
grid = {} | |
index = {} | |
rev_index = {} | |
adj_list = {} |
# tmux.conf - almost everything noted from the book "tmux Productive Mouse-Free Development" by "Brian P. Hogan" | |
# change default prefix to C-a and unbind C-b | |
set -g prefix C-a | |
unbind-key C-b | |
# to enable other programs to detect C-a(by double pressing) | |
bind-key C-a send-prefix | |
# '|' for vertical split and '-' for horizontal split | |
bind | split-window -h |
set expandtab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set autoindent | |
syntax enable | |
set number "show line numbers | |
set cursorline "highlight current line | |
filetype indent on |
Test mbostock's awesome bl.ocks.org
Somehow the author keeps on reiterating this point the reason for which essentially boils down as below
As configured in my dotfiles.
start new:
tmux
start new with session name: