Skip to content

Instantly share code, notes, and snippets.

View bot11's full-sized avatar

Ramakrishna Deepak Battu bot11

  • Sydney, Australia
View GitHub Profile
@bot11
bot11 / scp.py
Created July 14, 2014 05:26
paramiko scp
__author__ = 'bot11'
import sys, paramiko
hosts = {'host1': '192.168.1.1',
'host2': '192.168.1.2'}
port = 22
username = 'user'
@bot11
bot11 / sshmodify.py
Created July 14, 2014 05:27
Paramiko ssh
__author__ = 'bot11'
'''
Hop on to the servers and make the passwordauthentication no
'''
import sys
import paramiko as pm
@bot11
bot11 / utelnet.py
Last active August 29, 2015 14:06
Telnet library that verifies the remote port open
class Connect:
def __init__(self, ip, port):
self.ip = ip
self.port = port
def verify(self):
import socket
import telnetlib
session = None
try:
@bot11
bot11 / usocket.py
Created September 9, 2014 12:23
Verify the remote port open
class Connect:
def __init__(self, ip, port):
self.ip = ip
self.port = port
def verify(self):
import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
__author__ = 'root'
from keystoneclient.v2_0 import client as keystoneclient
from neutronclient.neutron import client as neutronclient
import sys
kclient = keystoneclient.Client(auth_url="http://localhost:35357/v2.0/",
username="admin", tenant_name="admin",
password="devstack")
@bot11
bot11 / Gstreamer
Last active January 12, 2022 03:41
Gstreamer notes
Lets say:
IP Address of Raspberry: 192.168.0.106
IP Address of ubuntu Desktop: 192.168.0.103
IP Address of remote linux server to copy image files: 192.168.0.200
1) On Raspberry pi , run the camera and stream using gstreamer as below:
raspivid -t 0 -w 800 -h 600 -fps 25 -g 5 -b 4000000 -vf -n -o - | gst-launch -v fdsrc ! h264parse ! gdppay ! tcpserversink host=192.168.0.106 port=5000
2) On Ubuntu desktop, run the local rtsp server as below:
@bot11
bot11 / gist:b5dc7c67fd9348d844b2
Last active April 15, 2017 09:14
Install openstack controller using chef cookbooks
** Proxy configuration at the end of document. Make sure you have it in case if you internet is routed from proxy
Installation of chef server:
---------------------------
1) Install pre-requisites:
$ apt-get update
$ apt-get install build-essential
$ apt-get install ruby1.9.3
$ apt-get install ruby-dev
@bot11
bot11 / reinstall setuptools
Created February 10, 2015 09:20
devstack errors
stack@devstackmac:~/devstack$ sudo PIP_DOWNLOAD_CACHE=/var/cache/pip HTTP_PROXY= HTTPS_PROXY= NO_PROXY= /usr/local/bin/pip install --build=/tmp/pip-build.RMFAI 'prettytable>=0.7'
The directory '/home/stack/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/stack/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
DEPRECATION: --download-cache has been deprecated and will be removed in the future. Pip now automatically uses and configures its cache.
The directory '/home/stack/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip wit
@bot11
bot11 / keystone middleware
Last active August 29, 2015 14:15
devstack errors
Error description:
-----------------
'keystone middleware' is not a global requirement but it should be,something went wrong
Solution:
--------
Update the oslo.config in all directories present at /opt/stack.
Change the requirements.txt and egg.info/requires.txt files only.
For example in cinder:
@bot11
bot11 / local.conf
Created February 11, 2015 02:58
devstack
[[local|localrc]]
HOST_IP=10.0.0.13
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack