Skip to content

Instantly share code, notes, and snippets.

@Resisty
Resisty / how_big_them_shits_is.py
Last active July 14, 2016 14:01 — forked from vigevenoj/how_big_them_shits_is.py
Inspect a list of images to see if any of them have really giant dimensions
#!/usr/bin/env python3
"""
This script takes as input a list of image IDs from image table and
uses the Pillow python library to determine the height and width
of each image. Indicate if the image is larger than a configured pixel limit.
"""
from argparse import ArgumentParser
import os
import sys
@Resisty
Resisty / greybeard
Last active August 25, 2016 15:27 — forked from lenards/greybeard
Greybeard Definition
Greybeard
An aging [unix hacker] type with an impressive [unix beard] that has now turned grey. Originally a young [neckbeard], these [Gandalf] resembling [curmudgeons] are renowned for their knowledge of theoretical computer science, arcane unix and complete inability to use a remotely contemporary computer.
Typically employed in academia, they are a dying breed from an antediluvian age of 8" [floppies], magnetic tape and timeshared computing. Despite having invented multiuser OSes and the internet, Greybeards prefer to live in the past, where they consider [Fortran] to be a high level programming language. Typical Greybeard computers are dated [Sun workstations] or old PCs running a command line only [BSD] variant, Greybeards shun GUIs, unless they're horrible and dated, like CDE or [Amiga] Workbench.
Some, like Edsger Dijkstra do most of their computer science as entirely theoretical exercises on paper and haven't programmed a computer since 1972.
Contacting a gr
@Resisty
Resisty / README.md
Created September 12, 2017 15:33 — forked from iMilnb/README.md
AWS Terraform configuration: Stream CloudWatch Logs to ElasticSearch

Rationale

This snippet is a sample showing how to implement CloudWatch Logs streaming to ElasticSearch using terraform. I wrote this gist because I didn't found a clear, end-to-end example on how to achieve this task. In particular, I understood the resource "aws_lambda_permission" "cloudwatch_allow" part by reading a couple of bug reports plus this stackoverflow post.

The js file is actually the Lambda function automatically created by AWS when creating this pipeline through the web console. I only added a endpoint variable handling so it is configurable from terraform.