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 python3 | |
# -*- coding: utf-8 -*- | |
# nginx_accesslog2csv: Convert nginx default, combined access log to CSV format | |
import os | |
import csv | |
import re | |
import sys | |
import datetime |
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 | |
# shellcheck disable=SC2034 | |
# shellcheck disable=SC2154 | |
# shellcheck source=/dev/null | |
# <bitbar.title>Bitbucket Pull Requests</bitbar.title> | |
# <bitbar.version>1.0</bitbar.version> | |
# <bitbar.author>Mikey Beck</bitbar.author> | |
# <bitbar.author.github>mikeybeck</bitbar.author.github> | |
# <bitbar.desc>Shows Bitbucket open pull request information</bitbar.desc> |
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 | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>Gerrit Incoming Code Reviews</bitbar.title> | |
# <bitbar.version>v1.1</bitbar.version> | |
# <bitbar.author>Ryan Sydnor</bitbar.author> | |
# <bitbar.author>Drew Gulino</bitbar.author> | |
# <bitbar.author.github>ryansydnor</bitbar.author.github> | |
# <bitbar.desc>Displays your incoming code reviews.</bitbar.desc> | |
# <bitbar.dependencies>python</bitbar.dependencies> |
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 boto3 | |
import collections | |
import datetime | |
import time | |
ec = boto3.client('ec2',region_name="us-east-1") | |
reservations = ec.describe_instances().get('Reservations',[]) | |
instances = [ |
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 | |
printf "%-20s %10s %10s %14s\n" "Process" "Ulimit" "Used" "% Ulimit Used" | |
length=62 | |
printf -v line '%*s' "$length" | |
echo ${line// /-} | |
# gather proceses to list from all of /var/run/ | |
for f in $(find /var/run/ -type f -name "*.pid" | sort) | |
# gather processes to list from monit | |
#for f in $(grep pidfile /etc/monit.d/* | awk '{print $6}' | sort) |
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 __future__ import print_function | |
import boto3 | |
import sys | |
from pygments import highlight, lexers, formatters | |
from botocore.exceptions import ClientError | |
iam = boto3.resource('iam') | |
s3 = boto3.client('s3') |
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 __future__ import print_function | |
import boto3 | |
iam = boto3.resource('iam') | |
for user in iam.users.all(): | |
for key in user.access_keys.all(): | |
if key.status == "Active": | |
print("user: {}, key: {}".format(user.name, key.id)) |
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 __future__ import print_function | |
import json | |
import boto3 | |
from botocore.exceptions import ClientError | |
ip="50.56.24.206/32" | |
new_ip="192.237.176.126/32" | |
for region in ["us-east-1","us-west-1", "us-west-2"]: |
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 __future__ import print_function | |
import sys | |
import json | |
import boto3 | |
from pprint import pprint | |
from termcolor import colored | |
from botocore.exceptions import ClientError |
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 | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>Gerrit Incoming Code Reviews</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Ryan Sydnor</bitbar.author> | |
# <bitbar.author.github>ryansydnor</bitbar.author.github> | |
# <bitbar.desc>Displays your incoming code reviews.</bitbar.desc> | |
# <bitbar.dependencies>python</bitbar.dependencies> |
NewerOlder