Skip to content

Instantly share code, notes, and snippets.

@ssaunier
ssaunier / importpdb.sublime-snippet
Created July 5, 2018 15:11
Python debugger snippet for Sublime Text
<snippet>
<content><![CDATA[import pdb; pdb.set_trace()]]></content>
<tabTrigger>pdb</tabTrigger>
<scope>source.python</scope>
<description>import pdb</description>
</snippet>
<!-- USAGE -->
<!-- 1. Go to Tools -> New Snippet -->
@hltbra
hltbra / Dockerfile
Created April 2, 2018 18:45
Running a PoC of selenium + chromium + python
FROM python:2.7
RUN apt-get update && \
apt-get install -y --no-install-recommends \
xvfb \
chromium \
chromedriver
RUN pip install selenium
import boto3
import json
import urllib, urllib2
import os
from datetime import datetime
from dateutil import tz
import time
ecs = boto3.client('ecs')
sns = boto3.client('sns')
import re
import time
from datetime import datetime, timedelta
import boto3
import json
import hashlib
from botocore.vendored import requests
SUCCESS = "SUCCESS"
FAILED = "FAILED"
@alessandrobologna
alessandrobologna / taskdefinition.py
Last active April 26, 2017 19:48
Custom Task Definition
import json
import boto3
from botocore.vendored import requests
import json
SUCCESS = "SUCCESS"
FAILED = "FAILED"
def lower(s):
return s[:1].lower() + s[1:] if s else s
@jhovell
jhovell / EcsBurstBalance.json
Created February 1, 2017 21:52
ECS BurstBalance monitoring, alerting and healthcheck
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Alerts on ECS burst balance and terminates unhealthy hosts",
"Parameters" : {
"ClusterName": {
"Type": "String",
"Description": "ECS Cluster name"
},
@jmaccabee
jmaccabee / pip_virtualenvs.sh
Last active October 19, 2016 16:41
Script to run Pip across multiple Virtual Environments
#!/bin/bash
######################################################################
# Useful script when you want to run `pip` in virtual environments #
# you have in a common directory with a provided Python package. #
# Note: Requires VirtualWrapper to be managing your environments #
# #
# Usage: #
# ./pip_virtualenvs.sh [-i | -u | -z] pkg_name [-a | -l] [env1 env2] #
# #
# Example: #
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB",
round(((data_length + index_length) / 1024 / 1024 / 1024), 2) "Size in GB"
FROM information_schema.TABLES
WHERE table_schema = "PUT_DATABASE_NAME_HERE"
ORDER BY (data_length + index_length) DESC;