Skip to content

Instantly share code, notes, and snippets.

View michaelconnor00's full-sized avatar

Mike Connor michaelconnor00

View GitHub Profile
@RichardHightower
RichardHightower / aaa-readme.md
Last active December 3, 2022 00:36
Setting up aws log agent to send journalctl from DC/OS logs to Amazon Log Service

In this example, we are using Centos7, journalctl and systemctl so that we can monitor logs from DC/OS instances (masters, agents and public agents). It is useful for anyone using systemd, journald in an AWS EC2 enviroment that wants logging. The nice thing about Amazon CloudWatch is that it integrates well with Amazon EMR and Amazon Elasticsearch. (For more background on this subject see this article which covers using CloudFormation, Packr, etc. for Immutable Infrastructure to build DC/OS and deploy it to Amazon Web Services.)

We will install journald-cloudwatch-logs. We are going to setup a daemon into systemd that forwards logs to Amazon CloudWatch log streams.

This utility ***journald-cloudwat

@evansneath
evansneath / Python3 Virtualenv Setup
Last active March 7, 2022 16:31
Setting up and using Python3 Virtualenv
To install virtualenv via pip
$ pip3 install virtualenv
Note that virtualenv installs to the python3 directory. For me it's:
$ /usr/local/share/python3/virtualenv
Create a virtualenvs directory to store all virtual environments
$ mkdir somewhere/virtualenvs
Make a new virtual environment with no packages
@prestontimmons
prestontimmons / Manifest.in
Created May 8, 2012 15:25
Minimal setup.py file
include README.md
global-include *.html
global-include *.js
global-include *.css
global-include *.json
global-include *.txt
global-include *.sql
@href
href / dict_namedtuple.py
Created October 27, 2011 12:00
Convert any dictionary to a named tuple
from collections import namedtuple
def convert(dictionary):
return namedtuple('GenericDict', dictionary.keys())(**dictionary)
"""
>>> d = dictionary(a=1, b='b', c=[3])
>>> named = convert(d)
>>> named.a == d.a
True
>>> named.b == d.b