I hereby claim:
- I am philipsd6 on github.
- I am philipsd6 (https://keybase.io/philipsd6) on keybase.
- I have a public key whose fingerprint is 0CE0 D71F 0491 3A03 AF2A D02E E66F DBF7 D927 3C2C
To claim this, I am signing this object:
def exists(path, as_user=None, use_sudo=False, verbose=False): | |
""" | |
Return True if given path exists on the current remote host. | |
If ``as_user`` is set, will use `sudo` as that user instead of `run`. If | |
''as_user'' or ''use_sudo'' is True, will use 'sudo' as root. | |
`exists` will, by default, hide all output (including the run line, stdout, | |
stderr and any warning resulting from the file not existing) in order to | |
avoid cluttering output. You may specify ``verbose=True`` to change this |
data = dict(line.split(None, 1) for line in ''' | |
key1 value | |
key2 value | |
key3 another value | |
key4 yet another value | |
'''.strip().splitlines()) |
twemproxy-source: | |
archive: | |
- extracted | |
- name: /tmp/ | |
- source: https://twemproxy.googlecode.com/files/nutcracker-0.3.0.tar.gz | |
- source_hash: sha1=b17f973ff2de9bd5e21417786a1449bea1557fba | |
- archive_format: tar | |
- tar_options: z | |
- if_missing: /tmp/nutcracker-0.3.0 |
gitlab-dirs: | |
file.directory: | |
- names: | |
- gitlab-satellites | |
- gitlab/tmp/pids | |
- gitlab/tmp/sockets | |
- gitlab/public/uploads | |
- user: git | |
- group: git | |
- mode: 755 |
# https://gist.github.com/philipsd6/3646b2856d2d6aaa2826 | |
import dropboxlogin |
I hereby claim:
To claim this, I am signing this object:
# complete words from tmux pane(s) {{{1 | |
# Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html | |
_tmux_pane_words() { | |
local expl | |
local -a w | |
if [[ -z "$TMUX_PANE" ]]; then | |
_message "not running inside tmux!" | |
return 1 | |
fi | |
# capture current pane first |
# http://nparikh.org/notes/zshrc.txt | |
# Usage: smartextract <file> | |
# Description: extracts archived files / mounts disk images | |
# Note: .dmg/hdiutil is Mac OS X-specific. | |
smartextract () { | |
if [[ -f $1 ]]; then | |
case $1 in | |
*.tar.bz2) tar -jxvf $1 ;; | |
*.tar.gz) tar -zxvf $1 ;; | |
*.bz2) bunzip2 $1 ;; |
# [Previewing Markdown Files from the Terminal][1] | |
# [1]: http://blog.metamatt.com/blog/2013/01/09/previewing-markdown-files-from-the-terminal/ | |
mdless () { | |
pandoc -s -f markdown -t man $1 | groff -T utf8 -man| grep -v '()$' | less | |
} |
# Install tmux on rhel/centos 7 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz | |
tar -xvzf libevent-2.0.22-stable.tar.gz | |
cd libevent-2.0.22-stable | |
./configure --prefix=/usr/local |