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 | |
rddToolBin="/usr/bin/rrdtool" | |
rmBin="/bin/rm" | |
chownBin="/bin/chown" | |
userThatOwnsDb="www-data" | |
dbList="someRRd.rrd" | |
rm -fr /var/www/dump | |
rm -fr /var/www/restore |
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 python2.7 | |
# You need to have installed google module | |
# i.e. | |
# easy_install google | |
# https://pypi.python.org/pypi/google | |
try: | |
import re | |
import sys |
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 | |
import threading, paramiko | |
cmd = "someCommand" | |
outlock = threading.Lock() | |
def workon(host): | |
try: |
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 | |
import re | |
import sys | |
import google | |
import urllib2 | |
if len(sys.argv) < 2: | |
print sys.argv[0] + ": <dict>" | |
sys.exit(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
tarro$ cat google-scan.py | |
#!/usr/bin/env python | |
import re | |
import sys | |
import google | |
import urllib2 | |
if len(sys.argv) < 2: | |
print sys.argv[0] + ": <dict>" |
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 | |
""" | |
vSphere Python SDK program for listing all ESXi datastores and their | |
associated devices | |
""" | |
import argparse | |
import atexit | |
from pyVim import connect | |
from pyVmomi import vmodl |
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 | |
import csv | |
import sys | |
import os | |
import json | |
import webbrowser | |
import httplib2 | |
from oauth2client.file import Storage | |
from oauth2client.client import flow_from_clientsecrets | |
from oauth2client.tools import run |
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 | |
import csv | |
import sys | |
import os | |
try: | |
import gdata.spreadsheet.service | |
except ImportError, e: | |
errMsg = "please install gdata see http://goo.gl/Eg22wF :C" | |
print >> sys.stderr, errMsg |
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 | |
""" | |
vSphere Python SDK program for connecting a Vmware host | |
""" | |
import atexit | |
from pyVim import connect | |
service_instance = connect.SmartConnect(host='host', | |
user='user', |
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 | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.poolmanager import PoolManager | |
import ssl | |
class FixSSL(HTTPAdapter): | |
def init_poolmanager(self, connections, maxsize, block=False): | |
self.poolmanager = PoolManager(num_pools=connections, | |
maxsize=maxsize, | |
block=block, |
OlderNewer