This file contains 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 python3 | |
import os | |
import sys | |
_b = sys.version_info[0] < 3 and (lambda x:x) or (lambda x:x.encode('utf-8')) | |
def ssh_exec_pass(password, args, capture_output=False): | |
''' | |
Wrapper around openssh that allows you to send a password to |
This file contains 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 python | |
# License: MIT Open Source | |
# Copyright (c) 2016 Joe Linoff | |
''' | |
The tool runs ssh or scp as a child process with a connected psuedo | |
terminal (pty). | |
It will automatically answer yes to the "Are you sure you want to | |
continue connecting (yes/no)?" if it comes up. |
This file contains 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
# download pypy | |
wget "https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.1-linux64.tar.bz2" -O - | tar -xj | |
# create virtual env with pypy | |
virtualenv -p pypy-5.1.1-linux64/bin/pypy .venv | |
# activate virtual environment | |
source .venv/bin/activate | |
# install uwsgi and gevent |