Skip to content

Instantly share code, notes, and snippets.

View jcreed's full-sized avatar

Jeff Reed jcreed

  • Liaison International
  • Amherst NY
  • X @jcreed63
View GitHub Profile
@jcreed
jcreed / FM scripts
Last active December 9, 2024 22:21
Manual Extract of Field Manager data
# sign on to wa-field-manager pod to pull json
# you will need usernamne and password for eco use
curl -H "Content-Type: application/json" -u username:password http://wa-field-manager-web-svc/api/v1/master/field_data.json > fm.json
# from you local transfer files to local then to wa-app pod
# copy to local from eco - cp {eco name}/{pod name}:/path to file
kubectl cp wa-only-fm/wa-field-manager-web-7949cbf9c-vgmhx:/opt/app/fm.json fm.json
# copy to eco wa-app pod - cp {eco name}/{pod name}:/path to file dropoff
kubectl cp fm.json wa-only-fm/wa-app-695db457bd-q9ftt:/opt/app/fm.json
@jcreed
jcreed / wa-sidekiq-star pod
Created April 18, 2024 15:48
scheduled jobs
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Welcome to namespace 'abhi-tech-approach'
rake aborted!
Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
/opt/app/config/application.rb:117:in `<class:Application>'
/opt/app/config/application.rb:31:in `<module:Webadmit>'
/opt/app/config/application.rb:30:in `<top (required)>'
/opt/app/Rakefile:6:in `require'
/opt/app/Rakefile:6:in `<top (required)>'
@jcreed
jcreed / wa-app log on startup
Created March 28, 2024 18:24
res cas issue
Defaulted container "wa-app" out of: wa-app, init-sysctl (init), init (init)
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Welcome to namespace 'nf-68387-offepic'
rake aborted!
Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
/opt/app/config/application.rb:110:in `<class:Application>'
/opt/app/config/application.rb:30:in `<module:Webadmit>'
/opt/app/config/application.rb:29:in `<top (required)>'
/opt/app/Rakefile:6:in `require'
RuntimeError: Document currently unavailable: code - 503
WHEN 10 minutes ago
MESSAGE Document currently unavailable: code - 503
URL GET https://wa-stg2.aws-staging.webadmit.org/documents/4706584?type=FullApplicationPdf
FILE lib/documents/applicant_pdf_downloader.rb:10
USER ADDRESS 10.144.13.222
REMOTE ADDRESS 44.212.122.190 United States
USER AGENT
Chrome 121.0.0.0
@jcreed
jcreed / ETL Sample Lookups CollegeBase
Last active January 30, 2024 22:26
CollegeBase types
diff --git a/config/lookup_definitions.tjcas.yml b/config/lookup_definitions.tjcas.yml
index c113cee4..8d45925f 100644
--- a/config/lookup_definitions.tjcas.yml
+++ b/config/lookup_definitions.tjcas.yml
@@ -117,15 +117,26 @@
:conditions:
:type: 'GlobalLookups::TranscriptType'
:cas_specific: false
+- colleges_medical_school:
+ :table_name: college_bases
@jcreed
jcreed / sample User Type & UI update
Created January 30, 2024 22:21
CollegeBase types
diff --git a/app/controllers/residency_users_controller.rb b/app/controllers/residency_users_controller.rb
index 78151dc49c..10da48ac24 100644
--- a/app/controllers/residency_users_controller.rb
+++ b/app/controllers/residency_users_controller.rb
@@ -12,7 +12,7 @@ class ResidencyUsersController < ApplicationController
def new
@user = User.new
@user_identity = @user.residency_user_identities.build
- @colleges = Association.where(name: 'ResidencyCAS').order(id: :desc).first.colleges
+ @colleges = Association.where(name: 'ResidencyCAS').order(id: :desc).first.medical_schools
@jcreed
jcreed / applicant 7733793975
Created January 23, 2024 13:30
eval answers w line break
irb(main):042:0> ea.map(&:string_value)
=>
["NF-66919 Testing\n\n \n\nWebAdMIT must honor/display page breaks or carriage returns in long-form question answers\n\n \n\nAnd right now we are going to test it.\n\n Let`s see if it works as expected.\n\n Works?\n\n \n\n \n\nGREAT!!!",
"NF-66919 Testing\n\n \n\nWebAdMIT must honor/display page breaks or carriage returns in long-form question answers\n\n \n\nAnd right now we are going to test it.\n\n Let`s see if it works as expected.\n\n Works?\n\n \n\n \n\nGREAT!!!",
"NF-66919 Testing\n\n \n\nWebAdMIT must honor/display page breaks or carriage returns in long-form question answers\n\n \n\nAnd right now we are going to test it.\n\n Let`s see if it works as expected.\n\n Works?\n\n \n\n \n\nGREAT!!!",
"NF-66919 Testing\n\n \n\nWebAdMIT must ho
@jcreed
jcreed / controller
Last active November 16, 2023 17:00
assoc controller update
class Admin::AssociationsController < Admin::BaseController
def index
Association.transaction do
@search_manager = SearchManagers::CasSearchManager.new(current_user_identity, params)
@associations = @search_manager.search
@counts = {
institutions: institutions_for_acceptable_associations_count,
organizations: organizations_for_acceptable_associations_count,
programs: programs_for_acceptable_associations_count,
@jcreed
jcreed / wa6877
Last active October 3, 2023 20:40
wa 6877 base task
namespace :after_party do
desc 'Deployment task: unassign_applicants'
task :wa_6877, [:group] => [:environment] do |_task, args|
next if args[:group] != 'before_load' # available before_migrate|before_load|after_load
include ReleaseTaskHelpers
puts "Running deploy task 'wa_6877'"
# if Rails.env.production?
display :info, "wa_6877 Starting task..."
@jcreed
jcreed / master branch
Created July 12, 2023 13:40
ruby upgrade issue
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Welcome to namespace 'wa-only'
/home/app/bundle/ruby/3.2.0/gems/whenever-0.9.7/lib/whenever/cron.rb:48: [BUG] Segmentation fault at 0x000055e1595921c0
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0038 p:---- s:0197 e:000196 CFUNC :===
c:0037 p:0026 s:0192 e:000190 METHOD /home/app/bundle/ruby/3.2.0/gems/whenever-0.9.7/lib/whenever/cron.rb:48
c:0036 p:0003 s:0187 e:000186 METHOD /home/app/bundle/ruby/3.2.0/gems/whenever-0.9.7/lib/whenever/cron.rb:42