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:
I hereby claim:
To claim this, I am signing this object:
| #!/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 |
| Assume we are in directory named "demo" and we have php: >=5.3.3 installed | |
| Download phpdoc from http://phpdoc.org/phpDocumentor.phar | |
| 1) Simple example of the source generation workflow | |
| Go to the packagist to the page of some package. For example https://packagist.org/packages/monolog/monolog | |
| Look of the package source code location at the top of the page. It will say "Source: https://github.com/Seldaek/monolog/tree/master" (99% it will be github) | |
| Go to this page and download source code archive. In our example it will be https://github.com/Seldaek/monolog/archive/master.zip | |
| Extract this archive to the some directory, for example in "source" |
| import sys | |
| import time | |
| import select | |
| import paramiko | |
| host = 'test.example.com' | |
| i = 1 | |
| # | |
| # Try to connect to the host. |
| 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') |
| 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') |
| #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, []) |
| <?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; |