Skip to content

Instantly share code, notes, and snippets.

@jgautsch
jgautsch / graph.cpp
Last active December 30, 2015 18:39
Graph implementation
// graph.cpp
//
// Author: Jon Gautsch
//
// Contact: jgautsch@nd.edu
//
// Course: CSE 30331, Fall 2013
#include "graph.h"
#include <sstream>
@jgautsch
jgautsch / heap_sort.c
Last active December 31, 2015 09:29
Heap sort with different sized sets of floats for the architecture project
#include <stdio.h>
#include <stdlib.h>
#define ValType double
#define IS_LESS(v1, v2) (v1 < v2)
void siftDown( ValType *a, int start, int count);
#define SWAP(r,s) do{ValType t=r; r=s; s=t; } while(0)
@jgautsch
jgautsch / .bashrc
Last active August 29, 2015 13:56
partial bashrc
# Turn on advanced bash completion if the file exists
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
# Locate virtualenvwrapper binary
if [ -f ~/.local/bin/virtualenvwrapper.sh ]; then
export VENVWRAP=~/.local/bin/virtualenvwrapper.sh
fi
@jgautsch
jgautsch / mirth_setup.md
Last active July 28, 2023 12:39
Setting up Mirth Connect for production

Mirth Server Setup

First create ec2 Ubuntu instance

Then install all the things needed for Mirth Connect (following this video: http://www.youtube.com/watch?v=omZyAO2naqs)

# Update Ubuntu
sudo aptitude update

# Safe upgrade of Ubuntu
sudo aptitude safe-upgrade
@jgautsch
jgautsch / .bash_profile
Created April 1, 2014 21:36
.bashrc and .bash_profile, RVM troubles
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
# Load in .bashrc -----------------------------------------------
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@jgautsch
jgautsch / 0001_fix_permissions.config
Created May 29, 2014 00:48
AWS Elastic Beanstalk Ruby 2.0/Passenger Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.2 running Ruby 2.0 (Passenger Standalone) stack. This is everything in my .ebextensions folder. Based on https://gist.github.com/gcarrion-gfrmedia/11396682
# Fixing permissions of packaged gems
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh":
content: |
#!/usr/bin/env bash
# . /opt/elasticbeanstalk/containerfiles/envvars
. /opt/elasticbeanstalk/support/envvars
CACHE_GEM_DIR=$EB_CONFIG_APP_ONDECK/vendor/cache
@jgautsch
jgautsch / params.rb
Created June 12, 2014 22:13
Schedule Setup Wizard params
params = {
weekly_recurring_schedule: {
length: 20,
color: "red",
user: 34,
locale: 11,
restriction: "Open to public",
name: "Dr ABC's appointments"
days: {
sunday: [
@jgautsch
jgautsch / Gemfile
Created August 21, 2014 20:45
Gemfile for NPI MapReduce job
source 'https://rubygems.org'
gem 'dotenv'
gem 'rake'
gem 'faker'
gem 'pry'
gem 'mongoid'
gem 'geocoder'
gem 'activesupport'
gem 'require_all'
@jgautsch
jgautsch / mongoid.yml
Created August 22, 2014 01:14
mongoid.yml for NPI MapReduce
development:
sessions:
default:
database: geocoded_providers
hosts:
- 0.0.0.0:27017
raise_not_found_error: false
options:
pool_size: 35
@jgautsch
jgautsch / classes.rb
Created August 22, 2014 02:24
classes.rb, The Classes that the NPI MapReduce script depends on
# ###########################################################
# Data Processing
# ###########################################################
module DataProcessing
class TaxonomyCache
def initialize
@@specialties = Taxonomies::Specialty.all[0..-1].group_by(&:taxonomy)
@@specialties.each do |k, v|
@@specialties[k] = v.first
end