Skip to content

Instantly share code, notes, and snippets.

Chris Ortman chrisortman

View GitHub Profile
chrisortman / split_palette.rb
Created Mar 22, 2019
Splits SIP v1 palette file to separate files you can import into SIP v2
View split_palette.rb
#Run these in your terminal first to copy the file and make the output folder
#cp ~/.sip_v1/.palettes.json ~/Desktop/old_sip.palette
#mkdir -p ~/Desktop/sip
#then run this script with ruby
require 'json'
require 'securerandom'
color_ids = { |h,k| h[k] = SecureRandom.uuid }
chrisortman / create_import_csv.rb
Created Nov 27, 2017
Converts constants.yml values to CSV for import into permissible values
View create_import_csv.rb
require 'yaml'
require 'csv'
require 'pathname'
SPARC_HOME = Rails.root
CONSTANTS_FILE = SPARC_HOME + "config/constants.yml"
OUTPUT_DIR = SPARC_HOME + "db/seeds/permissible_values/2.0.5"
"affiliations" => "affiliation_types",
"document_types" => "document_types",

Keybase proof

I hereby claim:

  • I am chrisortman on github.
  • I am chriso ( on keybase.
  • I have a public key ASDxxTaq45u7EKuikWvz-HevdVWdB-a-QmJzRb8zTj9ElQo

To claim this, I am signing this object:

chrisortman /
Created May 26, 2017
Streaming external program output in elixir
from sys import argv
from time import sleep
defaults = [
for index, arg in enumerate(argv[1:]):
chrisortman / migrate.exs
Created Jan 1, 2017
How to bulk generate UUID values for a new column
View migrate.exs
for id <- Repo.all( from r in "recipients", select: ),
{id, uid} = {id, Ecto.UUID.bingenerate},
do: from(r in "recipients", where: == ^id, update: [set: [uid: ^uid]])
|> Repo.update_all([])
chrisortman /
Last active Aug 23, 2016
Agile / Scrum / Lean

I don’t think there’s anything in agile that has no value. I’ve seen times where stand-ups, sprint planning, estimating, and time-boxed iterations weren’t optimal, but were used anyway. (scrum wikipedia entry lists most of them as when you shouldn’t use scrum) I think the best results come from identifying your feedback loops/channels and making them as small as possible.

I also think it is a mistake to try to insert a product owner / scrum master in between the stake holders and the people doing the work (assuming the stakeholders understand the problem domain). When you can sit the team next to the person who has the problem is when you can get the best results.

I’ve been places that have said we’re using agile, because they were doing scrum because they had a daily stand up and user stories and a project manager whose job it was to gather requirements and deliver them to programmers who then had to estimate those stories and then sign up for them in a sprint planning meeting and …. but at the same tim

chrisortman /
Created Feb 25, 2016
Simple script for running an rspec test during git-bisect
set +e
RAILS_ENV=test bundle exec rake db:schema:load
bundle exec rspec spec/models/arm/create_line_items_visit_spec.rb:57
echo Test complete
git checkout HEAD Gemfile.lock
exit $test_result
chrisortman / test.rb
Created Oct 29, 2015
name this test-antipattern
View test.rb
def add(x, y)
x + y
it 'adds' do
# does this anti-pattern have a name?
add(1, 2).must_equal(1 + 2)
chrisortman / grid.elm
Last active Oct 26, 2015
Grid with selectable rows
View grid.elm
import StartApp.Simple as StartApp
import Mouse
import Html exposing(..)
import Html.Attributes exposing(style,attribute)
import Html.Events exposing(..)
import Signal exposing(..)
main =
StartApp.start { model = model, view = view, update = update }
chrisortman / main.elm
Created Oct 16, 2015
Elm why you no check type alias
View main.elm
import Html exposing (text)
type alias ID = Int
type alias Minute = Int
f : ID -> Int
f x = x * 2
g : Minute -> Bool
g x = if x > 10 then True else False
You can’t perform that action at this time.