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/python | |
import boto3 | |
import os | |
from boto3.s3.transfer import S3Transfer | |
import socket | |
import argparse | |
import time | |
import hashlib | |
from botocore.exceptions import ClientError | |
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/python | |
import argparse | |
import sys | |
import requests | |
import xml.etree.ElementTree as ET | |
''' | |
Nagios plugin that check pending messages or low numbers of consumers in ActiveMQ queue | |
Author: Maoz Zadok | |
''' |
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/python3 | |
import elasticsearch | |
import argparse | |
import csv | |
from elasticsearch import helpers | |
import json | |
''' | |
Tool for exporting elasticsearch query to CSV file | |
assumption: the response document is not multidimensional(nested) document. |
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
export SWAPFILE="/swap/swap.`date +%y%m%d`.image"\ | |
&& mkdir /swap\ | |
&& dd if=/dev/zero bs=4k of=${SWAPFILE} count=250000\ | |
&& mkswap ${SWAPFILE}\ | |
&& chmod 600 ${SWAPFILE}\ | |
&& swapon ${SWAPFILE} |
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/python | |
#Simple script for importing data from bitly to yourls using bitly and yourls API. | |
import urllib2, json, urllib | |
#Add the following data | |
yourls_host = 'your-domain-where-yours-is-installed.com' | |
bitly_token = 'your-bitly-token' | |
yourls_signature = 'your-yourls-signature-key' |
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 ( | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/ec2" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/service/eks" | |
"os" | |
"fmt" |