Skip to content

Instantly share code, notes, and snippets.


Michael Gonzalez genomics-geek

View GitHub Profile
genomics-geek /
Created Apr 20, 2016
Installing PostgreSQL on Mac OSX

Installing PostgreSQL on Mac OSX

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

Download Download


  1. Move the downloaded file to ~/Applications
  2. Double click
genomics-geek / .env
Created Apr 20, 2016
Example .env file
View .env
genomics-geek / .bashrc
Created Jun 25, 2016
An example .bashrc file
View .bashrc
test -f /usr/local/bin/ && source /usr/local/bin/
if which pyenv > /dev/null ; then eval "$(pyenv init -)"; fi
genomics-geek / test_index.js
Created Sep 25, 2016
Karma tests entry point
View test_index.js
var testsContext = require.context(".", true, /_test$/);
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', () => {
genomics-geek /
Last active Sep 25, 2016
Guide to Virtual Environments

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 / karma.config.js
Created Sep 26, 2016
Karma unit testing config file
View karma.config.js
// Karma configuration
var webpackConfig = require('./webpack.local.config.js');
webpackConfig.entry = {};
module.exports = function(config) {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
View server.js
var webpack = require('webpack')
var WebpackDevServer = require('webpack-dev-server')
var config = require('./webpack.local.config')
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
inline: true,
historyApiFallback: true
}).listen(3000, '', function (err, result) {
View webpack.base.config.js
var path = require('path');
var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker')
module.exports = {
context: __dirname,
devtool: null,
entry: '../static/js/index',
output: {},
plugins: [],
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