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
import paraminko | |
paramiko.util.log_to_file('ssh.log') # sets up logging | |
client = paramiko.SSHClient() | |
client.load_system_host_keys() | |
client.connect('127.0.0.1', username=username, password=password) | |
stdin, stdout, stderr = client.exec_command('ls -l') |
I hereby claim:
- I am venis on github.
- I am venis (https://keybase.io/venis) on keybase.
- I have a public key ASAt1ChDfFPejQDeR4sCImxR7WYJA3RzO85wP45O1XxY_wo
To claim this, I am signing this object:
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
#http://kbyanc.blogspot.com/2007/07/python-aggregating-function-arguments.html | |
def arguments(): | |
"""Returns tuple containing dictionary of calling function's | |
named arguments and a list of calling function's unnamed | |
positional arguments. | |
""" | |
from inspect import getargvalues, stack | |
posname, kwname, args = getargvalues(stack()[1][0])[-3:] | |
posargs = args.pop(posname, []) |
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
import sys | |
import time | |
import select | |
import paramiko | |
host = 'test.example.com' | |
i = 1 | |
# | |
# Try to connect to the host. |
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
import paramiko | |
client = paramiko.SSHClient() | |
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
client.connect('127.0.0.1', username=username, password=password) | |
stdin, stdout, stderr = client.exec_command('ls -l') |
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
<?php | |
namespace Ormigo\Bundle\BackofficeBundle\Menu; | |
use Knp\Menu\FactoryInterface; | |
use Symfony\Component\DependencyInjection\ContainerAware; | |
use Ormigo\Bundle\UserBundle\Model\User\UserQuery; | |
use Symfony\Component\Security\Core\Role\SwitchUserRole; |
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
<?php | |
namespace Linkofy\CommonBundle\Menu; | |
use Knp\Menu\FactoryInterface; | |
use Symfony\Component\DependencyInjection\ContainerAware; | |
class Builder extends ContainerAware | |
{ | |
public function mainMenu(FactoryInterface $factory, array $options) |
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
#!/bin/sh | |
# /etc/init.d/mjpg_streamer.sh | |
# v0.2 phillips321.co.uk | |
### BEGIN INIT INFO | |
# Provides: mjpg_streamer.sh | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: mjpg_streamer for webcam |
NewerOlder