Skip to content

Instantly share code, notes, and snippets.

Jeff Reed jcreed

  • Liaison International
  • Amherst NY
Block or report user

Report or block jcreed

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
@jcreed
jcreed / task output
Last active Sep 5, 2019
hotfix 2019.008.002
View task output
==> Settings Transfer Code for MS in Taxation Fall 2019 changed to B10045.
==> Settings Transfer Code for MS in Taxation Spring 2020 changed to B10050.
==> Settings Transfer Code for Master of Sustainable Business-Fall 2019 changed to B10044.
==> Settings Transfer Code for One MBA changed to B10043.
==> Settings Transfer Code for Master of International Business-Fall 2019 changed to B10040.
==> Settings Transfer Code for Health Executive MBA- Spring 2020 changed to B10049.
==> Settings Transfer Code for MS in Health Administration-Fall 2019 changed to B10039.
==> Settings Transfer Code for Graduate Business Certificate changed to B10038.
==> Settings Transfer Code for Accelerated MBA in Real Estate changed to B10027.
==> Settings Transfer Code for Master of Accounting – Fall 2019 changed to B10028.
@jcreed
jcreed / task
Created Sep 5, 2019
settings transfer
View task
require 'csv'
namespace :releases do
namespace "2019.008.002" do
namespace :after_load do
desc "OBX-5231 - Manipulate Program Codes for Settings Transfer BusinessCAS:2020"
task "OBX-5231" => :environment do |task|
include ReleaseTaskHelpers
with_association('BusinessCAS', '2020') do |cas|
@jcreed
jcreed / 200600 local status id
Created May 22, 2019
old query plan for a local status that is not 200599
View 200600 local status id
Aggregate (cost=25469.67..25469.68 rows=1 width=8)
-> Nested Loop (cost=24712.66..25469.67 rows=1 width=0)
Join Filter: (applicants.id = applicants_2.id)
-> Nested Loop (cost=12438.03..13163.20 rows=1 width=16)
-> Nested Loop (cost=12437.75..13162.28 rows=1 width=20)
-> Nested Loop (cost=12437.32..13160.81 rows=1 width=24)
-> Nested Loop (cost=12436.88..13158.24 rows=1 width=16)
-> Hash Join (cost=12436.45..13156.34 rows=1 width=12)
Hash Cond: (designations.applicant_id = applicants_1.id)
-> Nested Loop (cost=129.98..849.69 rows=45 width=8)
View 200599 - original index used
Aggregate (cost=25469.67..25469.68 rows=1 width=8)
-> Nested Loop (cost=24712.66..25469.67 rows=1 width=0)
Join Filter: (applicants.id = applicants_2.id)
-> Nested Loop (cost=12438.03..13163.20 rows=1 width=16)
-> Nested Loop (cost=12437.75..13162.28 rows=1 width=20)
-> Nested Loop (cost=12437.32..13160.81 rows=1 width=24)
-> Nested Loop (cost=12436.88..13158.24 rows=1 width=16)
-> Hash Join (cost=12436.45..13156.34 rows=1 width=12)
Hash Cond: (designations.applicant_id = applicants_1.id)
-> Nested Loop (cost=129.98..849.69 rows=45 width=8)
@jcreed
jcreed / query plan
Created May 22, 2019
200599 - new index
View query plan
Unique (cost=52105.42..52105.70 rows=1 width=7404)
-> Sort (cost=52105.42..52105.43 rows=1 width=7404)
Sort Key: designations.rank, designations.school_name, applicants.last_name, emails.created_at DESC, applicants_emails.id, applicants_emails.applicant_id, applicants_emails.email_id, applicants_emails.status_description, applicants_emails.created_at, applicants_emails.updated_at, applicants.ssn, applicants.created_at, applicants.updated_at, applicants.score, applicants.identifier, applicants.email, applicants.middle_name, applicants.first_name, applicants.suffix, applicants.title, applicants.last_refresh, applicants.date_added, applicants.cas_id, applicants.association_id, applicants.application_complete, applicants.verified, applicants.verified_date, applicants.professional_pin, applicants.match_id, applicants.pre_submission_release_authorized, applicants.photo_file_name, applicants.photo_content_type, applicants.photo_file_size, applicants.photo_updated_at, applicants.id_number, applicants.i
@jcreed
jcreed / 200599
Created May 17, 2019
bad query that hangs
View 200599
SELECT DISTINCT applicants_emails.id AS t0_r0, applicants_emails.applicant_id AS t0_r1, applicants_emails.email_id AS t0_r2, applicants_emails.status_description AS t0_r3, applicants_emails.created_at AS t0_r4, applicants_emails.updated_at AS t0_r5, applicants.id AS t1_r0, applicants.ssn AS t1_r1, applicants.created_at AS t1_r2, applicants.updated_at AS t1_r3, applicants.score AS t1_r4, applicants.identifier AS t1_r5, applicants.email AS t1_r6, applicants.last_name AS t1_r7, applicants.middle_name AS t1_r8, applicants.first_name AS t1_r9, applicants.suffix AS t1_r10, applicants.title AS t1_r11, applicants.last_refresh AS t1_r12, applicants.date_added AS t1_r13, applicants.cas_id AS t1_r14, applicants.association_id AS t1_r15, applicants.application_complete AS t1_r16, applicants.verified AS t1_r17, applicants.verified_date AS t1_r18, applicants.professional_pin AS t1_r19, applicants.match_id AS t1_r20, applicants.pre_submission_release_authorized AS t1_r21, applicants.photo_file_name AS t1_r22, applicants.pho
View 200600
SELECT DISTINCT "applicants_emails"."id" AS t0_r0, "applicants_emails"."applicant_id" AS t0_r1, "applicants_emails"."email_id" AS t0_r2, "applicants_emails"."status_description" AS t0_r3, "applicants_emails"."created_at" AS t0_r4, "applicants_emails"."updated_at" AS t0_r5, "applicants"."id" AS t1_r0, "applicants"."ssn" AS t1_r1, "applicants"."created_at" AS t1_r2, "applicants"."updated_at" AS t1_r3, "applicants"."score" AS t1_r4, "applicants"."identifier" AS t1_r5, "applicants"."email" AS t1_r6, "applicants"."last_name" AS t1_r7, "applicants"."middle_name" AS t1_r8, "applicants"."first_name" AS t1_r9, "applicants"."suffix" AS t1_r10, "applicants"."title" AS t1_r11, "applicants"."last_refresh" AS t1_r12, "applicants"."date_added" AS t1_r13, "applicants"."cas_id" AS t1_r14, "applicants"."association_id" AS t1_r15, "applicants"."application_complete" AS t1_r16, "applicants"."verified" AS t1_r17, "applicants"."verified_date" AS t1_r18, "applicants"."professional_pin" AS t1_r19, "applicants"."match_id" AS t1_r20,
@jcreed
jcreed / export field update
Created May 7, 2019
export header field update task
View export field update
namespace :transfer_exports do
desc "Update The Common Application exports custom headers for custom questions"
task :update, [:cycle] => [:environment] do |task, args|
extend ReleaseTaskHelpers
cycle = args[:cycle]
if Cycle.where(identifier: cycle)
display :notice, task.full_comment
with_association('The Common Application', cycle) do |cas|
@jcreed
jcreed / cap staging
Created Apr 9, 2019
cap staging for ETL
View cap staging
Jeff-Reeds-MBP:webadmit-deploy jreed$ cap -S branch=feature/WA-5342 etl-current:staging deploy
* 16:43:42 == Currently executing `etl-current:staging'
triggering start callbacks for `deploy'
* 16:43:42 == Currently executing `multiconfig:ensure'
* 16:43:42 == Currently executing `deploy'
triggering before callbacks for `deploy'
* 16:43:42 == Currently executing `extractor:stop'
* 16:43:42 == Currently executing `transformer:stop'
* 16:43:42 == Currently executing `deploy:update'
** transaction: start
@jcreed
jcreed / Rails 4 schema diff
Created Oct 25, 2018
Production schema diff from Rails 3.2 to Rails 4
View Rails 4 schema diff
diff --git a/rails3_schema.rb b/rails4_schema.rb
-ActiveRecord::Schema.define(:version => 20180924201540) do
+ActiveRecord::Schema.define(version: 20180924201540) do
- create_table "about_mes", :force => true do |t|
- t.integer "applicant_id", :null => false
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
You can’t perform that action at this time.