start new:
tmux
start new with session name:
tmux new -s myname
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |
def local2(command, print_command=False): | |
"Run a command, returning the exit code, output, and stderr." | |
from subprocess import Popen, PIPE | |
p = Popen(command, stdout=PIPE, stderr=PIPE) | |
if print_command: print " ".join(command) | |
output, errput = p.communicate() | |
return p.returncode, output, errput | |
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'thread' | |
class CountDownLatch | |
attr_reader :count | |
def initialize(to) | |
@count = to.to_i |
import ldap | |
def check_credentials(username, password): | |
"""Verifies credentials for username and password. | |
Returns None on success or a string describing the error on failure | |
# Adapt to your needs | |
""" | |
LDAP_SERVER = 'ldap://xxx' | |
# fully qualified AD user name | |
LDAP_USERNAME = '%[email protected]' % username |
from collections import defaultdict | |
class BadMatch(NameError): | |
"""Exception when your args don't match a pattern""" | |
pass | |
class Any(object): | |
""" | |
>>> 'wutup' == Any() | |
True |
Copyright (C) 2011 by Colin MacKenzie IV | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
This will use GPT partitions and GRUB2 on a BIOS enabled PC (see Wiki for EFI). The Installation Guide can be found at /root/install.txt.
Get 2012.08.04 image or later from http://www.archlinux.org/download. Following tutorial requires at least 2011.07.15 image.
dd if=/dev/zero of=/dev/sdx bs=1k count=1
So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.
Now tmux has a concept of window-group
and session
and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.
This is the default case if you simply use the tmux
command as your login shell, effectively creating a new group of windows every time you start tmux
.
This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro