Skip to content

Instantly share code, notes, and snippets.

View hltbra's full-sized avatar

Hugo Lopes Tavares hltbra

View GitHub Profile
@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"
},
@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
import re
import time
from datetime import datetime, timedelta
import boto3
import json
import hashlib
from botocore.vendored import requests
SUCCESS = "SUCCESS"
FAILED = "FAILED"
@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
@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 -->