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
# a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes | |
# NOTE: requires the faker or ffaker gem | |
# sudo gem install faker - http://faker.rubyforge.org | |
# OR | |
# sudo gem install ffaker - http://github.com/EmmanuelOga/ffaker | |
require 'faker' | |
class Fakeout |
#!/usr/bin/env ruby | |
# Add your gems here | |
# | |
gemfile_contents = <<-EOF | |
source "http://rubygems.org" | |
gem "fog" | |
gem "yajl-ruby" | |
EOF |
require "time" | |
require "date" | |
class Date | |
def to_time | |
Time.local(year, month, day) | |
end | |
end | |
class Time |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
require 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
describe "GET #index" do | |
#describe "POST #create" do | |
#describe "GET #show" do | |
#describe "PATCH #update" do (or PUT #update) | |
#describe "DELETE #destroy" do | |
#describe "GET #new" do |
require 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
describe "GET #index" do | |
#describe "POST #create" do | |
#describe "GET #show" do | |
#describe "PATCH #update" do (or PUT #update) | |
#describe "DELETE #destroy" do | |
#describe "GET #new" do |
# Migrate schema and data from Mongoid to MySQL ActiveRecord | |
class MongoidMysqlMigrator | |
def randomize_auto_increment_values(source_models, from=5500, to=10500) | |
source_models.each do |model| | |
value = rand(from-to)+from | |
sql = %(ALTER TABLE #{model.name.tableize} AUTO_INCREMENT=#{value}) | |
puts sql | |
ActiveRecord::Base.connection.execute(sql) | |
end |
//the Mirth file reader has a CSV file (now in the msg object) | |
//be sure your channel's incoming data type is 'delimited text' | |
//let's pretend this csv contains customers | |
var customers = []; | |
var header = msg.row[0]; | |
for(var i=1;i<msg['row'].length();i++) | |
{ | |
var cust = {}; | |
for (col in msg.row[i].children()) { |
//the Mirth file reader has a CSV file (now in the msg object) | |
//be sure your channel's incoming data type is 'delimited text' | |
//let's pretend this csv contains customers | |
var customers = []; | |
var header = msg.row[0]; | |
for(var i=1;i<msg['row'].length();i++) | |
{ | |
var cust = {}; | |
for (col in msg.row[i].children()) { |
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