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 argparse | |
import requests | |
import logging | |
#logging.basicConfig(level=logging.DEBUG) | |
# Instantiate the parser | |
parser = argparse.ArgumentParser(description='Testing robot federation') | |
parser.add_argument('action', type=str, |
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 psycopg2 | |
import psycopg2.extras | |
HOST = "localhost" | |
PASSWORD = "password" | |
conn = psycopg2.connect(host=HOST, user="clair", password=PASSWORD, database="clair", port="5432") | |
print("Database opened successfully") | |
cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) |
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
yum install wget openssl-devel python-six python-sphinx gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel -y | |
useradd ovs | |
su - ovs | |
mkdir -p ~/rpmbuild/SOURCES | |
wget http://openvswitch.org/releases/openvswitch-2.9.2.tar.gz | |
cp openvswitch-2.9.2.tar.gz ~/rpmbuild/SOURCES/ | |
tar xfz openvswitch-2.9.2.tar.gz |
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/bash | |
LOCAL_IP=$(hostname -i) | |
REMOTE_IP=$1 | |
LOCAL_TUNNEL_IP=$2 | |
REMOTE_TUNNEL_IP=$3 | |
display_usage() { | |
echo -e "\nUsage: $0 [remote ip address] [local tunnel ip] [remote tunnel ip] \n" | |
} |
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
timing_indent = -1 | |
call_graph = list() | |
def timing(f): | |
def wrap(*args, **kwargs): | |
global timing_indent | |
global call_graph | |
timing_indent += 1 |
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
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
b64 "encoding/base64" | |
"errors" | |
"fmt" | |
"log" |
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 requests | |
import sys | |
import json | |
import urllib | |
import graphitesend | |
from docopt import docopt | |
""" | |
Usage: | |
sfmetrics.py --sf_host=<sf_host> --sf_user=<sf_user> --sf_password=<sf_password> --graphite_host=<graphite_host> --interval=<interval> |
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/python | |
""" | |
This script uses cgroups to limit a docker container's read/write bandwidth | |
Usage: | |
limit_docker_io.py <container_id> --read=<read_bps> --write=<write_bps> | |
Options: | |
--read=<read_bps> Read bps 0 for unlimited [default: 0] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Initializing variables | |
var message = "Tent + Sleeping bag le kar aana aur agar aapke paas " + | |
"anti leech hai woh jo powder etc woh be le kar aana"; | |
var contact = { name : "Dhiraj",phoneNumber : "+91123456789" } ; | |
var msg_time = new Date(2012,8,12,8,0,0,0); // Date(year, month, day, hours, minutes, seconds, milliseconds); | |
var msg_time_ms = msg_time.getTime(); | |
// End of variables initializing |
NewerOlder