Skip to content

Instantly share code, notes, and snippets.

View grahamb's full-sized avatar
🇨🇦
As Canadian as possible under the circumstances

Graham Ballantyne grahamb

🇨🇦
As Canadian as possible under the circumstances
View GitHub Profile
bad content body
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/multipart/parser.rb:74:in `block in fast_forward_to_first_boundary'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/multipart/parser.rb:72:in `loop'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/multipart/parser.rb:72:in `fast_forward_to_first_boundary'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/multipart/parser.rb:15:in `parse'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/multipart.rb:25:in `parse_multipart'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/request.rb:336:in `parse_multipart'
/var/rails/canvas/releases/20151013171611/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/request.rb:201:in `POST'
/var/rails/canvas/releases/20151013171611/vendor/bundl
@grahamb
grahamb / lcpreact.md
Last active December 2, 2015 00:29
LCP React Lunch and Learn
  • What is react?

  • Why is it nifty?

  • Hello World

@grahamb
grahamb / automated_canvas_release.md
Last active January 18, 2016 19:10
Automate Cutting a Canvas Release

need to know:

  • the SFU release date (for the branch name)
  • the Instructure release (for the head)

process

  • get the pointer to the stable HEAD commit from git/refs/heads/stable (response.object.url)
  • get the commit from above and check the message (contains treesame commit of origin/stable/INSTRUCTURE_RELEASE_DATE)
  • if not, error out; otherwise…
  • create new branches in the SFU repos (SFU_RELEASE_DATE-RANDOM_WORDS): PATCH https://api.github.com/repos/sfu/:repo/git/refs
    • PATCH body:
@grahamb
grahamb / sfucanvas.md
Last active August 16, 2021 17:54
SFU's Canvas LMS infrastructure and ugprade

🎓 Canvas at SFU

Simon Fraser University is a mid-sized comprehensive university with three campuses in the Greater Vancouver area of British Columbia, Canada. We are a trimester school, with a Fall, Spring and Summer term. We have approximately 25,000 undergraduate FTEs.

SFU chose Canvas as its new LMS during a selection process in 2011/2012. We went into production in 2012. As of this writing, our enrollment counts in Canvas are:

  • Students: 25250
  • Teachers: 1070
  • TAs: 865
@grahamb
grahamb / dashtechgoals.md
Created February 11, 2016 21:30
Student Dashboard Technical Design Goals

SFU Student Dashboard Technical Design Goals

A loose array of thoughts about the technical direction and goals of #teamdashboard

  • Accessibility-first
  • Modern browsers
  • Mobile-first
  • Fast

Accessibility-first

01-Nov-2016 12:06:23 Fetching https://github.com/rails-api/active_model_serializers.git
01-Nov-2016 12:06:26 Fetching https://github.com/codekitchen/nokogiri.git
01-Nov-2016 12:06:29 Fetching https://github.com/instructure/nokogiri-xmlsec-me-harder.git
01-Nov-2016 12:06:31 Fetching https://github.com/colleenpalmer/dress_code.git
01-Nov-2016 12:06:32 Fetching https://github.com/kreynolds/cassandra-cql.git
01-Nov-2016 12:06:33 Fetching https://github.com/ccutrer/redis-store.git
01-Nov-2016 12:06:35 Fetching https://github.com/grahamb/capistrano-canvas.git
01-Nov-2016 12:06:36 Fetching https://github.com/grahamb/capistrano-scm-copy.git
01-Nov-2016 12:06:37 Fetching https://github.com/maneframe/mocha.git
01-Nov-2016 12:06:52 Fetching gem metadata from https://rubygems.org/
$ NODE_ENV=production webpack --env.prod
/Users/grahamb/code/sfu/snap/node_modules/loader-runner/lib/loadLoader.js:35
throw new Error("Module '" + loader.path + "' is not a loader (must have normal or pitch function)");
^
Error: Module '/Users/grahamb/code/sfu/snap/node_modules/url/url.js' is not a loader (must have normal or pitch function)
at loadLoader (/Users/grahamb/code/sfu/snap/node_modules/loader-runner/lib/loadLoader.js:35:10)
at iteratePitchingLoaders (/Users/grahamb/code/sfu/snap/node_modules/loader-runner/lib/LoaderRunner.js:164:2)
at runLoaders (/Users/grahamb/code/sfu/snap/node_modules/loader-runner/lib/LoaderRunner.js:357:2)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@grahamb
grahamb / files_controller.diff
Last active May 4, 2018 18:49 — forked from lukfugl/files_controller.diff
fix avatar upload for local storage
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index eeaa0d3..fe0e7d9 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -763,7 +763,9 @@ class FilesController < ApplicationController
@attachment.uploaded_data = params[:file] || params[:attachment] && params[:attachment][:uploaded_data]
if @attachment.save
# for consistency with the s3 upload client flow, we redirect to the success url here to finish up
- redirect_to api_v1_files_create_success_url(@attachment, :uuid => @attachment.uuid, :on_duplicate => params[:on_duplicate], :quota_exemption => params[:quota_exemption])
+ includes = Array(params[:success_include])