This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
# Usage: | |
# pre-compress-web-assets [.|folder_name] | |
# | |
# This script will recursively look for the files in the $ext variable | |
# and compress/re-compress them. | |
# | |
# By default it will look into the current working folder, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
issues = RecruitmentCycle.current.courses.with_funding_types(["apprenticeship"]).distinct | |
xxxx = issues.map do |c| | |
provider_code = c.provider.provider_code | |
course__findable = c.findable? | |
find_url = course__findable ? "https://www.find-postgraduate-teacher-training.service.gov.uk/course/#{provider_code}/#{c.course_code}" : "" | |
pub_url = "https://www.publish-teacher-training-courses.service.gov.uk/organisations/#{provider_code}/2020/courses/{c.course_code}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🎉 Merged PR #3048 in DFE-Digital/publish-teacher-training | |
🗣 Commented on #1524 in DFE-Digital/find-teacher-training | |
🎉 Merged PR #1526 in DFE-Digital/find-teacher-training | |
🎉 Merged PR #1523 in DFE-Digital/find-teacher-training | |
🎉 Merged PR #1514 in DFE-Digital/find-teacher-training |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBJECTS = [ | |
{:name=>"Primary", :level=>:primary}, | |
{:name=>"Primary with English", :level=>:primary}, | |
{:name=>"Primary with geography and history", :level=>:primary}, | |
{:name=>"Primary with mathematics", :level=>:primary}, | |
{:name=>"Primary with modern languages", :level=>:primary}, | |
{:name=>"Primary with physical education", :level=>:primary}, | |
{:name=>"Primary with science", :level=>:primary}, | |
{:name=>"Art and design", :level=>:secondary}, | |
{:name=>"Science", :level=>:secondary}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
items = (RecruitmentCycle.current.providers.lead_school.map do |p| | |
p.users.non_admins.map do |u| | |
{ | |
provider_name: p.provider_name, | |
email: u.email, | |
} | |
end | |
end).flatten | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
items = Allocation.where(recruitment_cycle_id: RecruitmentCycle.current).map do |a | | |
{ | |
accredited_body_code: a.accredited_body_code, | |
accredited_body_name: a.accredited_body.provider_name, | |
provider_code: a.provider_code, | |
provider_name: a.provider.provider_name, | |
confirmed_number_of_places: a.confirmed_number_of_places, | |
request_type: a.request_type, | |
number_of_places: a.number_of_places, | |
url: "https://qa.publish-teacher-training-courses.service.gov.uk/organisations/#{a.accredited_body_code}/2021/allocations", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####### | |
# This is the latest (previous courses) | |
# flatten exploded courses over allocations + leftover allocations | |
# to use rails c | |
# copy and paste dump tip | |
####### | |
courses = Subject.find_by(subject_code: "C6").courses.with_recruitment_cycle(RecruitmentCycle.next.year).with_funding_types(["fee"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert "1000 trainees.gif" -coalesce "coalesce/1000 trainees.gif" | |
convert "coalesce/1000 trainees.gif" -trim +repage -resize '640x320>' -gravity center -background transparent -extent 640x320 "cropped/1000 trainees.gif" |
OlderNewer