Skip to content

Instantly share code, notes, and snippets.

View torsday's full-sized avatar

Chris Torstenson torsday

View GitHub Profile
@torsday
torsday / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@torsday
torsday / student_assessment.js.coffee
Created December 9, 2014 23:47
firewall_trigger.coffee
complete_assessment = (e) ->
$.ajax(
type: "PATCH"
url: $('#student_view_assessment').attr('data-updateurl')
success: (data) ->
if data.error
$('<div id="flash" class="alert">').html('<p>' + data.error + '</p>').insertBefore('#student_content')
e.preventDefault()
$('#student_view_assessment').html('Submit Answers')
else
@torsday
torsday / answers_controller.rb
Created November 24, 2014 19:29
tci_82865566.rb
class Shared::AnswersController < ApplicationController
before_filter :authenticate_student_or_teacher!
def create
@lesson = Lesson.where(id: params[:lesson_id]).first
authorize! :read, @lesson
@challenge = @lesson.challenge
@challenge_result = current_student ? @challenge.result_for_student(current_student) : @challenge.result_for_staffer(current_staffer)
@max_num_attempts = false
@torsday
torsday / tci_82068978.md
Created November 21, 2014 21:50
tci_82068978.md

TCI Pivotal: 82068978

Prototype Lesson: G2-U1-L1

ORIGINAL CONTENT CODE

<div class='G2'>
 <div class='g2-text-column'>
@torsday
torsday / tci_notes_2014-11-10.md
Created November 10, 2014 17:36
tci demo notes 2014-11-10

TCI Notes

Date: 2014.11.10 (A Monday in November)

INDEX

  • demo

Demo

@torsday
torsday / NOTES.md
Created November 6, 2014 17:51
tci notes 2014-11-05

TCI Lab Journal

Date: 2014.11.05 (A Wednesday in November)

To Do

  • fix cheat
  • look into analytics education
    • code school?

Demo Trial Account not working

@torsday
torsday / NOTES.md
Created November 5, 2014 22:51
tci lab 2014-11-05

TCI Lab Journal

Date: 2014.11.05 (A Wednesday in November)

To Do

  • fix cheat
  • look into analytics education
    • code school?

Demo Trial Account not working

@torsday
torsday / student_handouts_controller.rb
Created November 4, 2014 22:18
current_staffer_trial not working?
# remove "Guides" if a trial
if current_staffer_trial?(current_staffer.id, @program.id)
@student_handouts = student_handouts_unfiltered.select { |sh| sh.title !~ /guide/i }
else
@student_handouts = student_handouts_unfiltered
end
@torsday
torsday / student_handouts_controller.rb
Created November 4, 2014 19:21
handout select for cheaters
@student_handouts = student_handouts_unfiltered.select { |sh| sh.title !~ /guide/i }
puts "X__" * 64
@student_handouts.each {|x| puts "#{x.title}"}
puts "X__" * 64

Keybase proof

I hereby claim:

  • I am torsday on github.
  • I am torsday (https://keybase.io/torsday) on keybase.
  • I have a public key whose fingerprint is 8D94 9A61 3B20 3ACF E6C9 0283 EE05 A5A5 8922 65AC

To claim this, I am signing this object: