Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Gonzalez genomics-geek

View GitHub Profile
@genomics-geek
genomics-geek / README.md
Last active Sep 25, 2016
Guide to Virtual Environments
View README.md

Guide to Virtual Environments

A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

For example, you can work on a project which requires Django 1.3 while also maintaining a project which requires Django 1.0.

I highly recommend using virtualenvwrapper, it makes your life so much easier!

Set up

  1. Install pip
@genomics-geek
genomics-geek / setup_MacOSX_env.md
Last active Nov 20, 2017
Setting up your MacOSX machine as a dev machine
View setup_MacOSX_env.md
@genomics-geek
genomics-geek / Install_PostgreSQL_on_MacOSX.md
Created Apr 20, 2016
Installing PostgreSQL on Mac OSX
View Install_PostgreSQL_on_MacOSX.md

Installing PostgreSQL on Mac OSX

The easiest way I have found to install PostgreSQL on Mac OSX is by using Postgres.app.

Download Postgres.app

Postgres.app Download

Install

  1. Move the downloaded file to ~/Applications
  2. Double click
@genomics-geek
genomics-geek / Migrate_and_Deploy_Django_app_on_Heroku.md
Last active Jul 18, 2018
Guide on how to migrate your Django web application to be deployed on Heroku
View Migrate_and_Deploy_Django_app_on_Heroku.md
@genomics-geek
genomics-geek / .env
Created Apr 20, 2016
Example .env file
View .env
SECRET_KEY=13dfdasfaw3rarfdafjpj*(*&YO&D&FAFAHUH
DEBUG=true
ALLOWED_HOSTS=localhost 0.0.0.0 127.0.0.1
DATABASE_URL=postgres://user:password@localhost:5432/database
@genomics-geek
genomics-geek / .bashrc
Created Jun 25, 2016
An example .bashrc file
View .bashrc
export PIP_REQUIRE_VIRTUALENV=true
gpip(){
PIP_REQUIRE_VIRTUALENV="" pip "$@"
}
test -f /usr/local/bin/virtualenvwrapper.sh && source /usr/local/bin/virtualenvwrapper.sh
if which pyenv > /dev/null ; then eval "$(pyenv init -)"; fi
View .editorconfig
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Python settings
View .gitignore
# virtual environments
venv
# Python files
*.pyc
__pycache__
# Python Notebook dot files
.ipynb*
@genomics-geek
genomics-geek / test_index.js
Created Sep 25, 2016
Karma tests entry point
View test_index.js
var testsContext = require.context(".", true, /_test$/);
testsContext.keys().forEach(testsContext);
@genomics-geek
genomics-geek / example_test.jsx
Created Sep 25, 2016
Example test using expect
View example_test.jsx
import expect from 'expect';
describe('Something abstract', () => {
it('works', () => {
expect(1).toEqual(1);
});
});