Skip to content

Instantly share code, notes, and snippets.

In a quantum state between coding and procrastinating

Ben Orozco benoror

In a quantum state between coding and procrastinating
Block or report user

Report or block benoror

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
benoror / Heroku Release Phase script for managing Rails DB migrations, and playing nice with Review Apps and postdeploy scripts

Heroku Release Phase + Review Apps + Rails

This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps. Further, this particular set up plays nicely with Heroku Review Apps in that the release phase script will:

  1. Fail, loudly, if the DB does not yet exist.
  2. Load the DB schema if the current schema version (as determined by bin/rails db:version) is 0.
  3. Run DB migrations otherwise.

For a "normal" app that usually means it will run the DB migrations.

benoror /
Last active May 17, 2019
Rails Model XOR Validation for "Custom" fields

XOR Validation

validate :disease_or_custom_disease


def disease_or_custom_disease
  custom_disease.blank? ^ disease_id.blank?
benoror /
Last active Feb 26, 2019
JSON:API ( resources for React + Redux
benoror /
Last active Jun 29, 2019
Sundly Sharing (read-only)

User Story

  • Alice adds Bob as a contact
  • Alice shares his data with Alice
  • Bob now can see Alice Profile & Timeline (timestamped) in their contacts


[  ](link-to-user-profile/timeline) [Share icon]
View gist:08162f1182845d3d41a494182044640a
Verifying my Blockstack ID is secured with the address 1DAj3qXbJRVG6WTSAJv7DSSN6f5uVwFqBG

Tech Spec: Cumulus Alpha 0.1


As explained in the original purpose doc, Cumulus aims to provide a centralized way for sharing health records in a way that a diversity of systems (a.k.a. consumers) can pull & push patient data in an organized way, thus keeping the health records updated and relevant throughout different healthcare providers and the patient itself.

TL;DR; Digital health information should follow the patient throughout modern healthcare providers, and not the other way around

Technology / Components Architecture

benoror /
Last active Jan 18, 2018
(DRAFT) Pre-Tech Spec: Custom Forms 2.5

(DRAFT) Pre-Tech Spec: Custom Forms 2.5


As-is Now


View ascii.txt
+------+ +-----+ +-----+ +-----+
| | | | | | | |
| Foo +-->| Bar +---+ Baz |<--+ Moo |
| | | | | | | |
+------+ +-----+ +--+--+ +-----+
^ |
| V
benoror / is-empty-object.js
Last active Nov 18, 2016
View is-empty-object.js
* Helper to detect an empty Object ( {} )
* More info:
import Ember from 'ember';
const { Helper, isBlank } = Ember;
export function isEmptyObject(params) {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
You can’t perform that action at this time.