Skip to content

Instantly share code, notes, and snippets.

View vassyz's full-sized avatar
♦️

Sebastian Zaremba vassyz

♦️
View GitHub Profile
@vassyz
vassyz / 2484-request-for-update-in-applicant-profile.rb
Created November 9, 2023 11:40
[DfE] 2484-request-for-update-in-applicant-profile
role = 'Teaching Assistant'
organisation = 'Kwame Nkrumah University of Science and Technology'
commitment = 'full_time'
start_date_day = 1
start_date_month = 9
start_date_year = 2011
start_date_unknown = 'false'
end_date_day = 1
end_date_month = 8
end_date_year = 2012
@vassyz
vassyz / 2480-edit-course-status.rb
Last active November 7, 2023 14:20
[DfE] 2480-edit-course-status
course = RecruitmentCycle.current.providers.find_by(provider_code: "2BV").courses.find_by(course_code: "2XW3")
course.enrichments.max_by(&:created_at).update(status: "rolled_over", last_published_timestamp_utc: nil)
course.site_statuses.each do |site_status|
site_status.update(vac_status: :full_time_vacancies, status: :new_status, publish: :unpublished)
end
@vassyz
vassyz / 2481-visa-sponsorship.rb
Created November 7, 2023 11:39
[DfE] 2481-visa-sponsorship
provider =RecruitmentCycle.current.providers.find_by(provider_code: "2DP")
provider.courses.find_by(course_code: '2ZKM').update(can_sponsor_student_visa: false)
@vassyz
vassyz / 2431-update-to-unpaid-experience-section.rb
Created November 6, 2023 15:20
[DfE] 2431-update-to-unpaid-experience-section.rb
attributes = {
role: 'text',
organisation: 'text',
details: 'text',
working_with_children: true,
start_date: '2023-10-01',
end_date: '2023-10-01',
start_date_unknown: false,
end_date_unknown: false,
currently_working: false,
@vassyz
vassyz / 2280-reverse-action-i-took.rb
Created October 6, 2023 14:22
[DfE] 2280-reverse-action-i-took
application_choice = ApplicationChoice.find(410761)
course_option = CourseOption.find(114533)
audit_comment = 'https://becomingateacher.zendesk.com/agent/tickets/139913'
application_choice.update_course_option_and_associated_fields!(
course_option,
audit_comment:,
other_fields: {
course_option:,
course_changed_at: Time.zone.now,
},
@vassyz
vassyz / 2273-update-visa-sponsorship-for-course.rb
Created October 4, 2023 17:06
[DfE] 2273-update-visa-sponsorship-for-course
provider = RecruitmentCycle.current.providers.find_by(provider_code: "1M1")
course = provider.courses.where(course_code: '295G').first
course.update(can_sponsor_student_visa: false)
@vassyz
vassyz / 2237-withdrawn-course-in-apply.rb
Created October 3, 2023 20:26
[DfE] 2237-withdrawn-course-in-apply
course = RecruitmentCycle.next.providers.find_by(provider_code: "C23").courses.find_by(course_code: "CX11")
course.enrichments.max_by(&:created_at).update(status: "draft", last_published_timestamp_utc: nil)
course.site_statuses.each do |site_status|
site_status.update(vac_status: :no_vacancies, status: :new_status)
end
#!/usr/bin/env bash
#
# Originally from https://gist.github.com/IanVaughan/2902499
#
# authors: Ian Vaughan
# Jacob Zimmerman
#
# usage: uninstall_gems [<version> ...]
#
# examples:
@vassyz
vassyz / Dockerfile Rails
Created December 9, 2015 17:42
Docker Rails
FROM ubuntu
ENV RAILS_PORT 3000
ENV RAILS_ENV "${APP_ENV}"
ENV RAILS_ROOT "/var/www"
RUN apt-get update && \
apt-get install -yq \
git-core \
curl \