Skip to content

Instantly share code, notes, and snippets.

View rodrigoacastro's full-sized avatar

Rodrigo Araújo e Castro rodrigoacastro

View GitHub Profile
@colebrooke
colebrooke / ls-s3-sizes.sh
Last active September 8, 2022 06:16
Quickly list sizes of AWS S3 buckets without traversing all objects.
#!/bin/bash
# Justin Miller 12/01/17
# Script to calculate the human readable size of S3 buckets
# The script uses cloudwatch metrics. These may need time to update if you've added data to a bucket within 24hrs.
# It happily DOES NOT need to travese potentially millions of files to calculate your S3 bucket sizes.
#
# Usage:
# ./ls-s3-sizes.sh
#
# TODO: Could be further parameterised depending on usage requirements.
@vsajip
vsajip / pyvenvex.py
Last active June 4, 2025 08:34
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve
@thiagosilr
thiagosilr / paisesPortuguesIngles.sql
Created November 9, 2012 13:30
Tabela MYSQL com o nome de todos os países em Português / Inglês
--
-- Estrutura da tabela `pais`
--
CREATE TABLE IF NOT EXISTS `pais` (
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`paisNome` varchar(50) NOT NULL,
`paisName` varchar(50) NOT NULL,
PRIMARY KEY (`paisId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ;