Monday, 20 July 2015

Virtualenv and python 3 on Mac OSx

brew install python3
which python3
Look at the path and:
mkvirtualenv --python=python3_path python3


Inspired by
http://www.marinamele.com/2014/07/install-python3-on-mac-os-x-and-use-virtualenv-and-virtualenvwrapper.html
https://djangosteps.wordpress.com/2013/09/25/setup-a-virtualenv-for-python3/

Push non-master branch to Heroku

Push branch to Heroku


git push heroku_repo_name branch_name:master

Thursday, 4 June 2015

Output to a CSV file from a Postgres query

Write the query in script_name.sql file. Run:



        psql database --no-align -F"," -P "footer=off" --quiet -f script_name.sql -o output_file.csv