Skip to content

Instantly share code, notes, and snippets.

View msummers42's full-sized avatar

Matt Summers msummers42

View GitHub Profile
@msummers42
msummers42 / calc_entropy.py
Created September 22, 2020 18:58 — forked from 4k1/calc_entropy.py
Calculate Session Identifier entropy with Claude Shannon formula.
# calc_entropy.py
# Calculate Session Identifier entropy with Claude Shannon formula.
# https://github.com/4k1
import math
import sys
import time
import urllib.request
# Check params
if (len(sys.argv) != 3):
@msummers42
msummers42 / Tableau.xml
Created July 31, 2019 20:53 — forked from cmtoomey/Tableau.xml
Fully Documented Tableau Workbook as XML
<?xml version='1.0' encoding='utf-8' ?>
<!--This is the basics - platform (windows or mac)and version number-->
<workbook source-platform='mac' version='9.0' xmlns:user='http://www.tableausoftware.com/xml/user'>
<!-- build 9000.15.0318.1720 -->
<!--No idea what this for -->
<preferences>
<preference name='ui.encoding.shelf.height' value='250' />
<preference name='ui.shelf.height' value='250' />
</preferences>
<!--This is everything you need to know about datasources -->
@msummers42
msummers42 / irc.md
Created August 23, 2018 16:31 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@msummers42
msummers42 / celery.sh
Created August 23, 2017 16:22 — forked from hanneshapke/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@msummers42
msummers42 / spinner.py
Created February 24, 2017 02:40 — forked from cevaris/spinner.py
Simple Python CLI Spinner
#!/usr/bin/env python
import itertools
import sys
import time
import threading
class Spinner(object):
spinner_cycle = itertools.cycle(['-', '/', '|', '\\'])
@msummers42
msummers42 / find_empty_vpcs.py
Created December 16, 2016 22:07 — forked from jezhumble/inventory_vpcs.py
Find VPCs with no EC2 instances in them
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse, sys, boto3, pprint
parser = argparse.ArgumentParser(description='Find VPCs that contain no EC2 instances')
parser.add_argument('--aws-key', dest='aws_key', help='AWS Key')
parser.add_argument('--aws-secret-key', dest='aws_secret_key', help='AWS Secret Key')
parser.add_argument('--region', dest='region', help='Limit to a single region')
args = parser.parse_args()
@msummers42
msummers42 / nginx.conf
Created June 20, 2016 14:29 — forked from nateware/nginx.conf
Nginx sample config for EC2
#
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances.
# Also look at the haproxy.conf file for how the backend is balanced.
#
user "nginx" "nginx";
worker_processes 10;
error_log /var/log/nginx_error.log info;
{
"title": "Apache logs",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
@msummers42
msummers42 / pillar-data
Last active August 29, 2015 14:10 — forked from SEJeff/pillar-data
message_do_not_modify: Do not edit this file, this is handled by Salt
graphite_address: 127.0.0.1
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade