(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
:
import time | |
import socket | |
def collect_metric(name, value, timestamp): | |
sock = socket.socket() | |
sock.connect( ("localhost", 2003) ) | |
sock.send("%s %d %d\n" % (name, value, timestamp)) | |
sock.close() | |
def now(): | |
int(time.time()) |
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |
set -U fish_color_user magenta | |
set -U fish_color_host yellow | |
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
# User | |
set_color $fish_color_user | |
printf (whoami) | |
set_color normal |
Using pyCLI to create some commands and subcommands. |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#! /usr/bin/env python | |
from pykka.actor import Actor | |
import pykka | |
import urllib | |
class Fetcher(Actor): | |
def fetch(self, url): | |
return urllib.urlopen(url).read() |
; Copyright 2009-2015 RackTop Systems Inc. and/or its affiliates. | |
; http://www.racktopsystems.com | |
; | |
; The methods and techniques utilized herein are considered TRADE SECRETS | |
; and/or CONFIDENTIAL unless otherwise noted. REPRODUCTION or DISTRIBUTION | |
; is FORBIDDEN, in whole and/or in part, except by express written permission | |
; of RackTop Systems. | |
; | |
; @@DESCRIPTION@@ Configuration file for Netatalk -- Apple Filing Protocol. | |
; @@NAME@@ afp.conf |
Install prerequisites: | |
$ sudo apt-get install build-essential pkg-config checkinstall git-core avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev | |
Download src: | |
$ cd /some/temp/dir | |
$ git clone git://git.code.sf.net/p/netatalk/code netatalk | |
$ cd netatalk | |
$ ./bootstrap |