Fix brew update - Error: /usr/local must be writable!

Hi guys just a quick reminder on how to fix this Homebrew error below: I was running this command: brew update && brew upgrade ruby-build It returned the error message below: Error: /usr/local is not writable. You should change the ownership and permissions of /usr/local back to your user account: sudo chown -R $(whoami) /usr/local Just fixed this by doing: sudo chown -R $(whoami) /usr/local And you are good to go. Read On →

Containerizing your applications with Docker - Part 2

Ready for Part 2? If you don’t read, please read Part 1 which will give you a brief introduction in some concepts that you will need to grasp before get your hands dirty with Docker. Ok? So….Let’s get started. Docker Image Docker images are the basis of containers. It’s an encapsulated environment ready to be replicated wherever you want. Each time you’ve used docker run you told it which image you wanted. Read On →

Containerizing your applications with Docker - Part 1

Docker. First time I’ve heard about Docker and I did some research on this topic, I couldn’t understand what Docker was. I’m used to Virtual Machines, Vagrant and so on. I thought they (Docker and Vagrant) were the same thing but I was completely wrong. Let’s make first a brief introduction to some concepts to clarify what Docker is and how can we use it. What is a Virtual Machine (VM)? Read On →

Serving staticfiles in Django with WhiteNoise

Hi, in this post I’m going to show you how to use WhiteNoise to serve static files using Django. WhiteNoise is a library to radically simplified static file serving for Python web applications. With a couple of lines of config WhiteNoise allows your web app to serve its own static files, making it a self-contained unit that can be deployed anywhere without relying on nginx, Amazon S3 or any other external service. Read On →

Python Generators

I’m the Generator, firing whenever you quit Yeah whatever it is, you go out and it’s on Yeah can’t you hear my motored heart You’re the one that started it Não…eu não vou escrever neste post sobre a ótima música do Foo Fighters (embora recomendo que você a escute =P). Estamos aqui para falar de uma função bastante legal na nossa linguagem de programação preferida: Os famosos Generators. Em termo simples os Generators são funções que permitem a você declarar uma função que se comporta como um iterador, ou seja, que pode ser usado dentro de um loop for. Read On →

How to setup ATOM as your Python development environment

Hi, PyCharm is an awesome IDE for Python Development and I use it a lot. But sometimes it gets heavier that I want to kill myself. Then I’ve found ATOM. ATOM is a coding editor created by the GitHub team to be simple, powerful and highly customizable. There are some features that I really like in ATOM like: Built-in package manager Multiple panes File system browser If you want to give it a try and use ATOM as your Python development environment, follow me in this post and I’ll show you how I configure my ATOM settings to make easier for us Python developers to have a very simple and powerful development environment. Read On →

Coexistence between GitHub and 'Heroku Git'

Ok, you’ve deployed your app to Heroku but there is something missing. You want to show the world your new work done. You want to show your brand new awesome code. How to do that? It’s very simple actually. First you need to create a new repository on your GitHub account. Click on the green button (picture below) to create a new repository on your GitHub account: Here I named the repository “eventex”. Read On →

Installing MongoDB on Ubuntu Linux 14.04 (Trusty)

MongoDB is an open source, document-oriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas. You can watch this video below for more information: Basically MongoDB is a non-relational datastore for JSON documents. The documents are stored in a collection. A record in MongoDB is a document, which is a data structure composed of field and value pairs. Read On →

Restoring Siebel 6 attachments - Python script

Hi all, here is my solution to make the Siebel 6.3 attachments restore easier. Following the rules of automating boring stuff with Python, I did the script that I’m sharing with you guys. Enjoy! What the script does? You pass the ROW_ID and the script takes care of the rest. It will look at the database, find the FILE_REV_NUMBER, look at the purge folder and restore the attachment based on the ROW_ID that you entered. Read On →

How to run sudo apt-get update through proxy in Shell

I was struggling with this because I was configuring my http_proxy, https_proxy and ftp_proxy using export but when I was doing sudo apt-get udpate, nothing happened. Did some research on StackOverflow and found the solution. So I’m keeping the solution here for future reference. This problem happens because in some releases sudo is configured in such a way that all environment variables all cleared when running the command. My proxy didn’t have authentication so I did: export http_proxy="http://proxy.servername:port/" export https_proxy="http://proxy.servername:port/" export ftp_proxy="http://proxy.servername:port/" After that I did: visudo There is a line that states: Defaults env_reset After that line just add: Defaults env_keep = "http_proxy https_proxy ftp_proxy" Voilá. Read On →