This file contains hidden or 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 | |
DBUSER=my_username | |
DBPASS=my_secret_password | |
DBHOST=my_hostname | |
DBNAME=my_database_name | |
TABLE=my_table | |
BUCKET=my_bucket | |
yesterdayFile=$(date -d '1 day ago' +"%Y-%m-%d")'.tsv' |
This file contains hidden or 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
# From here: http://serverfault.com/questions/504431/human-readable-format-for-http-headers-with-tcpdump/633452#633452 | |
sudo tcpdump -A -s 10240 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\n\1/g' |
This file contains hidden or 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 | |
aws rds modify-db-parameter-group --db-parameter-group-name mysql56-improved --parameters \ | |
ParameterName=character_set_server,ParameterValue=utf8,ApplyMethod=pending-reboot \ | |
ParameterName=collation_server,ParameterValue=utf8_unicode_ci,ApplyMethod=pending-reboot \ | |
ParameterName=tmp_table_size,ParameterValue={DBInstanceClassMemory/16},ApplyMethod=pending-reboot \ | |
ParameterName=max_heap_table_size,ParameterValue={DBInstanceClassMemory/16},ApplyMethod=pending-reboot \ | |
ParameterName=query_cache_type,ParameterValue=1,ApplyMethod=pending-reboot \ | |
ParameterName=query_cache_size,ParameterValue=131072,ApplyMethod=pending-reboot \ | |
ParameterName=table_open_cache,ParameterValue=2500,ApplyMethod=pending-reboot \ |
This file contains hidden or 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/python | |
import argparse | |
import glob | |
import os | |
from PIL import Image | |
from PIL import ImageFont | |
from PIL import ImageDraw | |
from distutils.spawn import find_executable | |
import time | |
import re |
This file contains hidden or 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 | |
# Allows to attach and remove EBS volumes managed under LVM to | |
# have a dynamically sized partition attached to an EC2 instance | |
# | |
# Intance needs either to be launched with a role able to access to relevant AWS API endpoints | |
# or the credentials can be hardcoded in the config. | |
# | |
# Minimal IAM Role: | |
# { |