Skip to content

Instantly share code, notes, and snippets.

@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
@camillol
camillol / spaceutil.c
Created August 6, 2011 14:54
Two ways of messing with spaces
#include <unistd.h>
#include <CoreServices/CoreServices.h>
#include <ApplicationServices/ApplicationServices.h>
typedef int CGSConnection;
extern OSStatus CGSGetWorkspace(const CGSConnection cid, int *workspace);
extern OSStatus CGSSetWorkspace(const CGSConnection cid, int workspace);
extern CGSConnection _CGSDefaultConnection(void);
int get_space_id(void);
@bradgessler
bradgessler / .rvmrc
Created July 29, 2011 01:40
rvmrc file that controls the version of Ruby, the Gemset, Rubygems, and Bundler. Use this if you want to control this stuff in your development workflow.
#!/usr/bin/env bash
# Bare minimum Gems that are needed to keep a Ruby development environment in sync. This assumes
# that you use bundler in your workflow to control the installation of all other gems. If you need
# to bump the bundler or rubygem version across your team, change that here, then run bundler and
# and keep going.
RVMRC=1.9.2@my_gem_set
RUBYGEM_VERSION="1.6.2"
BUNDLER_VERSION="1.0.15"
@devmod
devmod / gist:1013129
Created June 7, 2011 20:52
bridge.sh
ifconfig eth2 0.0.0.0
ifconfig eth3 0.0.0.0
brctl addbr mybridge
brctl addif mybridge eth2
brctl addif mybridge eth3
dhclient mybridge
@rosenfeld
rosenfeld / gist:202717
Created October 6, 2009 03:04
First Ruby Challenge - Shift Subtitle
require 'optparse'
optparse = OptionParser.new do |opts|
opts.banner = 'Usage: shift_subtitle.rb --operation add|sub --time ss,mmm input_file output_file'
opts.on('--operation OPERATION', /^add|sub$/, 'OPERATION must be add or sub'){|o| @operation=o}
opts.on('--time TIME_SHIFT', /^\d{2},\d{3}$/,
'TIME_SHIFT must be in format ss,mmm, where ss are the seconds and mmm are the milliseconds to shift') do |o|
@time_shift = o.sub(',', '.').to_f
end
@macks
macks / dm-collate.rb
Created July 31, 2009 18:49
Column-level collation support for DataMapper/MySQL
# Column-level collation support for DataMapper/MySQL
#
# e.g.)
# property :name, String, :collate => 'utf8_bin'
gem 'dm-core', '0.9.11'
require 'dm-core'
require 'dm-core/adapters/mysql_adapter'