Skip to content

Instantly share code, notes, and snippets.

View PlasticLizard's full-sized avatar

Nathan Stults PlasticLizard

View GitHub Profile
https://empireflippers.com/listing/44858/
https://empireflippers.com/listing/44859/
https://empireflippers.com/listing/44790/
https://empireflippers.com/listing/44782/
https://empireflippers.com/listing/44819/
https://empireflippers.com/listing/44784/
https://empireflippers.com/listing/44696/
https://empireflippers.com/listing/44841/
https://empireflippers.com/listing/44826/
https://empireflippers.com/listing/44617/
@PlasticLizard
PlasticLizard / ems_encounter.json
Last active December 10, 2015 04:21
Examples of a Data Model Description language for our multi-layer domain / data specs.
{
"id":"http://schemas.syncordia.com/rcm/ems_encounter",
"version":"1.0.0",
"extends": "encounter/1.0.0",
"name": "EMSEncounter",
"title":"EMS Encounter",
"description":"Represents the aspects EMS Transport needed to achieve fast, effective reimbursement",
"source_documents":{
"PCR":{"title":"Patient Care Report", "requirement":"mandatory"},
"CAD":{"title":"Computer Aided Dispatch", "requirement":"optional"},
@PlasticLizard
PlasticLizard / gist:3890103
Created October 14, 2012 23:06
Name candidates
ilumina
Propelic : .com is actually available
Comperio : latin for to find out with certainty
Cogna, Cognametric
Concero, Concero Technologies, Concero Solutions, etc. : latin for to connect or join
@PlasticLizard
PlasticLizard / sql_server_data_reader.rb
Created April 10, 2012 04:26
Connecting to SQL server from IronRuby
# IronRuby script
require "rubygems"
require "system.data"
require "json"
module SqlServerDataReader
# method to read data from a given source_database on a given source_server, based on the given query
# it will yield records row by row so you can do something with the yield row in a block
#
@PlasticLizard
PlasticLizard / part_of_mongo_storage.rb
Created November 18, 2011 23:54
getting around BSON serialization issues
def to_mongo(doc, with = {})
prep_for_save(doc) if ["msgs","configurations"].include? doc["type"]
#ruote functional tests suggest that messages will occasionally have
#an unserialized FlowExpressionId if they are representing an error.
#Since we are no longer converting documents to JSON, this will cause
#mongo db to reject the document, so we convert it. configurations need classes
#converted to strings
doc.merge(with).merge!("put_at" => Ruote.now_to_utc_s)
end
@PlasticLizard
PlasticLizard / cluster_runner.rb
Created November 8, 2011 05:12
Ruby DSL sketch
require "redis_word_count_toplogy"
cluster = StormCluster.submit RedisWordCountToplogy.create do |config|
config.debug true
config.num_workers 20
config.max_spout_pending 1000
end
@PlasticLizard
PlasticLizard / msgpack.rb
Created July 5, 2011 20:28
Formatter woes
require 'msgpack'
module Goliath
module Rack
module Formatters
# A MessagePack formatter.
# @example
# use Goliath::Rack::Formatters::MSGPACK
class MSGPACK
include AsyncMiddleware
# These are my notes from the PragProg book on CoffeeScript of things that either
# aren't in the main CS language reference or I didn't pick them up there. I wrote
# them down before I forgot, and put it here for others but mainly as a reference for
# myself.
# assign arguments in constructor to properties of the same name:
class Thingie
constructor: (@name, @url) ->
# is the same as:
test("a partial preceding a selector", function() {
var string = "Dudes: {{>dude}} {{another_dude}}";
var dude = "{{name}}";
var hash = {name:"Jeepers", another_dude:"Creepers"};
shouldCompileTo(string, [hash, {partials: {dude:dude}}], "Dudes: Jepers Creepers", "Regular selectors can follow a partial");
});
testclasses.rb
class Expense
include MongoMapper::Document
key :expense_id, ObjectId
key :amount, Float #FloatToDecimalPrecision
key :date, Time
key :notes, String
key :tags, Array # => company
key :type, String