This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def to_human(t) | |
ms = ((t-t.floor)*10).floor | |
sec = t.floor | |
hour = (sec/3600).floor | |
sec -= hour * 3600 | |
min = (sec/60).floor | |
sec -= min * 60 | |
sprintf "%02d:%02d:%02d.%01d", hour, min, sec, ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def to_human(t) | |
ms = ((t-t.floor)*10).floor | |
sec = t.floor | |
hour = (sec/3600).floor | |
sec -= hour * 3600 | |
min = (sec/60).floor | |
sec -= min * 60 | |
sprintf "%02d:%02d:%02d.%01d", hour, min, sec, ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tempfile | |
import subprocess | |
import errno | |
def _popen(cmd, stdin=None, stdout=None, stderr=None, notty=False): | |
if notty: | |
try: | |
p1 = subprocess.Popen(cmd, stdin=stdin, | |
stdout=subprocess.PIPE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -t 0 && -t 1 && -t 2 && $# == 0 ]]; then | |
exec tmux -q -2 set -g default-shell /bin/zsh \; new-session | |
else | |
exec /bin/bash "$@" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $TMUX != "" && `/usr/bin/tmux show-options 2> /dev/null | grep "^status off$"` ]]; then | |
/usr/bin/tmux set status on \; $@ &> /dev/null | |
else | |
if [[ $1 == "--nostatus" ]]; then | |
/usr/bin/tmux -2 new-session \; set status off | |
else | |
/usr/bin/tmux -2 $@ | |
fi | |
fi |
NewerOlder