Skip to content

Instantly share code, notes, and snippets.

View chrisortman's full-sized avatar

Chris Ortman chrisortman

View GitHub Profile
View tab_bar_component.html.erb
<div class="lg:hidden">
<label for="selected-tab" class="sr-only">Select a tab</label>
<select id="selected-tab" name="selected-tab" class="block w-full py-2 pl-3 pr-10 mt-1 text-base border-gray-300 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm rounded-md">
<% tabs.each do |t| %>
<option><%= t.text %></option>
<% end %>
<div class="hidden lg:block">
View sub.exs
defmodule Common do
defmacro __using__(_opts) do
quote do
def validate(thing) do
Common.validate({__MODULE__, thing})
chrisortman / aws_filter.jq
Last active April 15, 2019 12:07
Shell stuff for putting AWS context in my prompt (make sure jq is on your path)
View aws_filter.jq
if .Account == "9999999" then "test" elif .Account == "111111" then "prod" else "" end
chrisortman / split_palette.rb
Created March 22, 2019 16:17
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 November 27, 2017 19:32
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 15:45
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 January 1, 2017 20:09
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 August 23, 2016 18:51
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 February 25, 2016 15:26
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