(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:
| from heapq import heapify, heappop | |
| from binascii import a2b_hex | |
| from collections import defaultdict | |
| from struct import unpack | |
| from sys import argv, exit | |
| def parse_byte(bstring): | |
| return unpack('>B', a2b_hex(bstring))[0] | |
| def dijkstra(graph, source): |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the nginx web server | |
| # Description: starts nginx using start-stop-daemon |
| #-*- coding:utf-8 -*- | |
| import Queue | |
| from contextlib import contextmanager | |
| class ObjectPool(object): | |
| """A simple object pool with thread safe""" | |
| def __init__(self,objectFn,*args,**kwargs): | |
| super(ObjectPool, self).__init__() | |
| self.objectFn = objectFn | |
| self.objectCls = None |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib2 | |
| gh_url = 'https://api.github.com' | |
| req = urllib2.Request(gh_url) | |
| password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
| import fcntl | |
| import os | |
| import struct | |
| import subprocess | |
| # Some constants used to ioctl the device file. I got them by a simple C | |
| # program. | |
| TUNSETIFF = 0x400454ca | |
| TUNSETOWNER = TUNSETIFF + 2 |
| /var/log/celery/*.log { | |
| weekly | |
| missingok | |
| rotate 52 | |
| compress | |
| delaycompress | |
| notifempty | |
| copytruncate | |
| } |