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
@grahamb
grahamb / gist:9695394
Last active August 29, 2015 13:57
build dir
build
├── alpha
│   └── zimbra
│   └── jetty
│   ├── common
│   │   └── lib
│   ├── etc
│   └── webapps
│   └── zimbra
│   ├── js
@grahamb
grahamb / gulpfile.js
Last active June 25, 2021 20:35
gulpfile.js
var gulp = require('gulp');
var gutil = require('gulp-util');
var replace = require('gulp-replace');
var clean = require('gulp-clean');
var exec = require('gulp-exec');
var zip = require('gulp-zip');
var uglify = require('gulp-uglify');
var gzip = require('gulp-gzip');
var gulpFilter = require('gulp-filter');
var clone = require('gulp-clone');
@grahamb
grahamb / gist:10667847
Created April 14, 2014 17:32
Delayed jobs
uninitialized constant QuizSubmission
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/dependencies.rb:469:in `load_missing_constant'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/dependencies.rb:106:in `const_missing_with_dependencies'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/dependencies.rb:118:in `const_missing'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/inflector.rb:375:in `const_get'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/inflector.rb:375:in `block in constantize'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/inflector.rb:374:in `each'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesupport/lib/active_support/inflector.rb:374:in `constantize'
/mnt/data/gems/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activesuppor
var request = require('request');
var Q = require('q');
var courseUrlBase = 'http://foo.bar/?';
var canvasUrl = 'http://foo.baz';
var courses = ['2014/summer/iat/100/d100', '2014/spring/bisc/372/d100'];
function getAllOutlines(courses) {
var promises = [];
courses.forEach(function(course) {
@grahamb
grahamb / gist:f733113732879a58e1e9
Created June 30, 2014 23:04
/usr/local/canvas/config
config
├── data
│   └── dbdata
│   ├── pg_hba.conf.edge
│   ├── pg_hba.conf.prod
│   ├── pg_hba.conf.prod.bak
│   ├── pg_hba.conf.stage
│   ├── pg_hba.conf.stage.bak
│   ├── pg_hba.conf.test
│   └── pg_hba.conf.test.bak
@grahamb
grahamb / aaa_sfu_misc
Created July 22, 2014 21:06
Canvas Rails 3 migration – plugin errors
undefined method `to_str' for #<Pathname:0x00000006193bf0> (NoMethodError)
/mnt/data/gems/ruby/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:41:in `load'
/mnt/data/gems/ruby/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:66:in `rescue in require'
/mnt/data/gems/ruby/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
/mnt/data/gems/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
/mnt/data/gems/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
/mnt/data/gems/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
/var/rails/canvas/releases/20140722202511/vendor/plugins/aaa_sfu_misc/lib/test_cluster.rb:21:in `<top (required)>'
/mnt/data/gems/ruby/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
/mnt/data/gems/ruby/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
* e1666cc Merge commit 'd89bc1a7b3f64c99038716a4150b3f9267f742b9' into edge
|\
| * 2101916 Draft-State Quizzes - "Save It Now" should work
| * df6be76 fix issue with republish quiz not working correctly pre-draft state
| * c1b4b88 fix issue with publishing a module not publishing quiz item correctly
| * 45d19f3 validate types on polymorphic associations
* | 6886e18 (refs/remotes/sfu/shoot-the-hostage, refs/remotes/origin/shoot-the-hostage, refs/heads/shoot-the-hostage) Merge commit 'db41b7613d94f689a7415d0855c9652bf76b689c' into shoot-the-hostage
|\ \
| * | 2d502e8 (tag: refs/tags/release/2014-06-14.08) fix issue with republish quiz not working correctly pre-draft state
| * | 2643b7f (tag: refs/tags/release/2014-06-14.03) fix issue with publishing a module not publishing quiz item correctly
* e1666cc Merge commit 'd89bc1a7b3f64c99038716a4150b3f9267f742b9' into edge
|\
| * 2101916 Draft-State Quizzes - "Save It Now" should work
| * df6be76 fix issue with republish quiz not working correctly pre-draft state
| * c1b4b88 fix issue with publishing a module not publishing quiz item correctly
| * 45d19f3 validate types on polymorphic associations
* | 6886e18 (refs/remotes/sfu/shoot-the-hostage, refs/remotes/origin/shoot-the-hostage, refs/heads/shoot-the-hostage) Merge commit 'db41b7613d94f689a7415d0855c9652bf76b689c' into shoot-the-hostage
|\ \
| * | 2d502e8 (tag: refs/tags/release/2014-06-14.08) fix issue with republish quiz not working correctly pre-draft state
| * | 2643b7f (tag: refs/tags/release/2014-06-14.03) fix issue with publishing a module not publishing quiz item correctly
[canvasuser@icat-graham-canvas 20140821210546]$ RAILS_ENV=production bundle exec rake db:migrate
default: production
== AddUniqueIndexOnNotifications: migrating ==================================
-- add_index(:notifications, [:name], {:unique=>true, :name=>"index_notifications_unique_on_name"})
-> 0.0250s
== AddUniqueIndexOnNotifications: migrated (0.1386s) =========================
== CreateSwitchmanShards: migrating ==========================================
-- table_exists?("switchman_shards")
-> 0.0006s
[- -] Connecting to database specified by database.yml
[- -] (147.1ms) SELECT * FROM unnest(current_schemas(false))
[- -] Switchman::Shard Load (1.8ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
[- -] (0.3ms) SELECT * FROM unnest(current_schemas(false))
[- -] Switchman::Shard Load (1.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1
[- -] (38.8ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
[- -] Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'development' AND "switchman_shards"."name" IS NULL LIMIT 1
[- -] (0.3ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
[- -] Setting Load (41.1ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'encryption_key_hash' LIMIT 1 [shard 1 master]
[- -]