Skip to content

Instantly share code, notes, and snippets.

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;
[extensions]
extdiff =
fetch =
rebase =
mq =
histedit = /usr/bin/histedit.py
pager =
transplant =
graphlog =
bookmarks =
@jbochi
jbochi / gist:3264872
Created August 5, 2012 13:41
POSCOMP 2012 - Conteúdos Programáticos por Área de Conhecimento

Área de Matemática

Álgebra Linear

Sistemas de Equações Lineares: método de eliminação de Gauss para sistemas lineares. Espaços vetoriais. Subespaços. Bases.

@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: #
@surjikal
surjikal / graphite.md
Created May 17, 2012 18:14 — forked from caged/graphite.md
Installing Graphite on OS X Lion

Follow these steps to install graphite on OS X Lion.

Prerequisites

  • Python 2.7
  • Brew
  • Git

Install dependencies

Install Cairo

@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"
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')
@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