Skip to content

Instantly share code, notes, and snippets.

View szibis's full-sized avatar

Slawomir Skowron szibis

View GitHub Profile
@szibis
szibis / s3uploader.py
Last active January 29, 2017 17:00
LogtoS3 Watcher - Uploading to S3 after logrotate with multipart and threading, triggered by inotify, filtered by regex
#!/usr/bin/env python
import gzip
import snappy
import uuid
import time
import subprocess
import pyinotify
import argparse
import re
### Keybase proof
I hereby claim:
* I am szibis on github.
* I am szibis (https://keybase.io/szibis) on keybase.
* I have a public key ASAwMxeD_NQFqCM4jCou0ytNzci_yU8RmB-jEBOTS5wNyAo
To claim this, I am signing this object:
@szibis
szibis / ephemeral.fact
Last active March 29, 2016 19:12
Ansible EC2 ephemeral custom facter to use in software RAID and with_items
#!/usr/bin/python
import json
import backoff
import urllib2
METADATA_URL_BASE = "http://169.254.169.254/2012-01-12/"
BLOCK_DEVICE_MAPPING = METADATA_URL_BASE + "meta-data/block-device-mapping/"
@backoff.on_exception(backoff.expo,
---
- name: testing vars_files start
hosts: localhost
user: root
gather_facts: false
vars_files:
- vars.yml
vars:
type: "var_from_vars"
tasks: