Skip to content

Instantly share code, notes, and snippets.

@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 / .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 / 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 / .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 / 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 / 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 / btree.c
Created December 5, 2013 02:36
btree for benchmarking
#include <stdio.h>
#include <stdlib.h>
// #include "Tree.h"
typedef int ElementType;
struct TreeNode;
typedef struct TreeNode *Position;
typedef struct TreeNode *SearchTree;
SearchTree MakeEmpty(SearchTree T);
@jgautsch
jgautsch / heap.c
Created December 5, 2013 02:09
reformatted the heap code
/* HPSORT.C : PROGRAM TO CREATE A HEAP AND TO SORT A HEAP, HEAP IS STORED IN AN ARRAY */
#include<stdio.h>
#include<conio.h>
void crheap(int [], int);
void processheap(int [],int);
int main(void)
{
int k[50],child,parent,q,key,n,t,i;
clrscr();
printf("\n enter the no. of elements: ");
@jgautsch
jgautsch / thermd.c
Last active December 27, 2015 01:08
fixed the thermal sensor server. The problem was not closing the socket, resulting in too many file descriptors open. I'll send part of a readme soon...
/***** Jon Gautsch and Rob Wirthman
***** thermd.c
***** CSE 30264 - Project 2
*****
***** USAGE: ./tcpserver
*****
***** See comments and README.txt for details
*****/
#include <stdio.h> /* for printf() and fprintf() */
@jgautsch
jgautsch / thermd.c
Created October 30, 2013 19:59
Thermal sensor threaded server
/***** Jon Gautsch and Rob Wirthman
***** thermd.c
***** CSE 30264 - Project 2
*****
***** USAGE: ./tcpserver
*****
***** See comments and README.txt for details
*****/
#include <stdio.h> /* for printf() and fprintf() */